Tool category

PHP coding standards

Linters and rule-enforcement tools for formatting, naming, documentation, and project-specific coding conventions.

Tools in this category

8 tools. Editor picks appear first; review the requirements and trade-offs of each tool.

Coding standards

PHP_CodeSniffer

Active

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

  • PHP
  • Static Analysis
Type
Analyzer
PHP
>=7.2.0
License
BSD-3-Clause
Install
composer require --dev phpcsstandards/php_codesniffer
Stars
1,576
Latest
4.0.4
Last commit
Last release
Quick pros & cons for PHP_CodeSniffer

ProSupports established standards and detailed custom sniffs.

ConLarge standards need configuration and can produce many findings.

Editorially reviewed

Coding standards

WordPress Coding Standards

Active

WordPress core, plugin, and theme projects enforcing ecosystem conventions in CI.

  • PHP
  • PHPCS
  • Wordpress
Type
Ruleset
PHP
>=7.2
License
MIT
Pricing
Free and open source
Install
composer require --dev wp-coding-standards/wpcs
Stars
2,845
Latest
3.4.1
Last commit
Last release
Quick pros & cons for WordPress Coding Standards

ProApplies the official WordPress PHP conventions through the familiar PHPCS workflow.

ConIts conventions are specific to WordPress projects and require PHP_CodeSniffer.

Editorially reviewed

Coding standards

EasyCodingStandard

Active

ECS runs PHP-CS-Fixer and PHP_CodeSniffer as a single, parallel fast tool with zero dependencies. Run on PHP 7.2+

  • PHP
Type
Orchestrator
License
MIT
Stars
1,630
Latest
13.3.17
Last commit
Last release
Quick pros & cons for EasyCodingStandard

ProRuns PHP-CS-Fixer and PHP_CodeSniffer from one config.

ConIts wrapper adds another configuration layer.

Editorially reviewed

Coding standards

Slevomat Coding Standard

Active

Teams building a strict, project-specific PHPCS standard with many automatically fixable rules.

  • Code Quality
  • PHP
  • PHPCS
Type
Ruleset
PHP
^7.4 || ^8.0
License
MIT
Pricing
Free and open source
Install
composer require --dev slevomat/coding-standard
Stars
1,479
Latest
8.31.3
Last commit
Last release
Quick pros & cons for Slevomat Coding Standard

ProOffers a broad PHPCS ruleset spanning safety, cleanup, formatting, and autofix.

ConIts large and evolving rule catalog needs an explicitly pinned project ruleset.

Editorially reviewed

Coding standards

composer-normalize

Active

🎵 Provides a composer plugin for normalizing composer.json.

Type
Fixer
PHP
~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
License
MIT
Install
composer require --dev ergebnis/composer-normalize
Stars
1,127
Latest
2.57.0
Last commit
Last release
Quick pros & cons for composer-normalize

ProKeeps composer.json formatting deterministic.

ConIt only checks and rewrites composer.json.

Editorially reviewed

Coding standards

TLint

Active

Tighten linter for Laravel conventions.

  • PHP
Type
Ruleset
PHP
>=8.1
License
MIT
Install
composer require --dev tightenco/tlint
Stars
532
Latest
v9.7.0
Last commit
Last release
Quick pros & cons for TLint

ProChecks Laravel code against Tighten's conventions.

ConIts rules target Laravel projects.

Editorially reviewed

Coding standards

editorconfig-checker

Active

A tool to verify that your files are in harmony with your .editorconfig

  • Code Quality
  • PHP
Type
Analyzer
PHP
^7.2 || ^8.0
License
MIT
Install
composer require --dev editorconfig-checker/editorconfig-checker
Stars
76
Latest
11.0.0
Last commit
Last release
Quick pros & cons for editorconfig-checker

ProVerifies EditorConfig rules across a repository.

ConIt enforces basic formatting rules, not PHP semantics.

Editorially reviewed

Coding standards

PHP Doc Check

Inactive

Uses complexity metrics to determine which functions need documentation.

  • PHP
Type
Analyzer
License
MIT
Install
composer require --dev niels-de-blaauw/php-doc-check
Stars
43
Latest
v0.4.1
Last commit
Last release
Quick pros & cons for PHP Doc Check

ProUses complexity to focus documentation effort.

ConComplexity is only a proxy for documentation value.

Editorially reviewed