PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
1.5k
Stars
113
Forks
206
Open issues
30
Contributors
AI Analysis
PHP_CodeSniffer is a static analysis tool that tokenizes PHP files and detects violations of defined coding standards, with an accompanying auto-fixer (phpcbf). It is essential infrastructure for PHP development teams and CI/CD pipelines seeking to enforce consistent code style and standards compliance. PHP developers and teams of all sizes benefit; it is not applicable to non-PHP projects.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Official continuation of PHP_CodeSniffer, maintained after original abandonment, provides code standard checking and auto-fixing
PHP_CodeSniffer is a static analysis tool that tokenizes PHP code and enforces coding standards via configurable rulesets. It has two components: phpcs (detection) and phpcbf (auto-correction). This repository is the official community-maintained successor to the abandoned Squizlabs original, created in November 2023. It remains widely used in PHP development teams and CI/CD pipelines as a foundational code quality tool, though adoption data is not explicitly documented in the README.
PHP_CodeSniffer was originally created by Squizlabs and became a standard tool in PHP development for enforcing PSR coding standards. The original repository was abandoned, prompting the community to fork and establish PHPCSStandards as the official continuation in November 2023. This transfer preserved the established user base and ecosystem.
Growth appears driven by the succession event itself—the project gained legitimacy as the official continuation of a widely-deployed tool. Recent activity (last push 2026-06-26, 5 stars in last 7 days) suggests steady but modest ongoing growth. The project likely benefits from existing organizational inertia rather than viral adoption; teams already using PHPCS stayed with the maintained version.
Adoption not verified from README alone. No case studies, user testimonials, or deployment counts documented. Inherits credibility from being the official continuation of an established tool, but current real-world usage cannot be quantified from available metadata. The ecosystem of coding standard packages (WordPress-Coding-Standards, slevomat/coding-standard) depends on PHPCS compatibility, suggesting widespread indirect use.
Based on README: two-script architecture (phpcs for detection, phpcbf for correction). Likely uses a tokenization approach to parse PHP syntax and match against configurable standard definitions. Appears to support pluggable sniff rules and custom standards. Installation options include Phar, Composer, Phive, and direct Git cloning, suggesting modular deployment.
README mentions badge for Coverage Status via Coveralls (linked to 4.x branch), but specific coverage percentage not stated. CI/CD workflows validate and test across PHP 7.2–8.5. Test infrastructure appears solid but depth unknown.
Last push 2026-06-26 (8 days before evaluation date), indicating active maintenance. CI workflows running (Validate, Test badges present). Repository shows regular activity. No indication of backlog decay or abandoned issues. Appears actively maintained, not stagnant.
ADOPT IF: your team or project already standardizes on PHPCS, you need a maintained, officially-blessed continuation of established tooling, or you require both detection and auto-correction in a single integrated tool with PSR/PEAR standards built-in. AVOID IF: you are selecting a new code quality stack and have no existing PHPCS investment—PHP-CS-Fixer or PHPStan may better fit modern workflows depending on your priorities (auto-fixing vs. static analysis). MONITOR IF: you want to assess long-term viability of the community fork model for maintaining critical infrastructure; the project is healthy now but lacks the vendor backing the original had.
Independent dimensions
Mainstream potential
4/10
Technical importance
7/10
Adoption evidence
4/10
- Adoption and real-world usage metrics are not publicly documented; cannot verify how many production systems depend on this fork vs. lingering on old versions.
- Depends entirely on volunteer maintainer availability; if core maintainers reduce engagement, governance and release cadence could degrade.
- Star count (1,527) and fork count (112) are modest relative to competing tools; suggests niche or stable (not growing) market share.
- No explicit long-term roadmap documented in README; unclear whether new PHP language features (e.g., attributes, enums) are prioritized.
- Community fork lacks organizational backing of original Squizlabs; potential for fragmentation if another fork emerges.
PHPCS will likely remain a stable, maintained standard for teams already invested in it. Growth will remain modest—this is a successor-preservation project rather than a disruptive innovation. The tool will continue to serve as infrastructure for the broader PHP quality ecosystem (feeding downstream standards packages). Maintenance will remain active but not accelerating.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- BSD-3-Clause
- Last updated
- 4d ago
- Created
- 33mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Open pull requests
Top contributors
Similar repos
WordPress/WordPress-Coding-Standards
WordPress Coding Standards (WPCS) is a PHP_CodeSniffer ruleset that enforces...
slevomat/coding-standard
Slevomat Coding Standard is a comprehensive PHP_CodeSniffer ruleset providing...
PHP-CS-Fixer/PHP-CS-Fixer
PHP CS Fixer is an automated tool that detects and fixes PHP coding standards...
PHPCompatibility/PHPCompatibility
PHPCompatibility is a PHP_CodeSniffer standard that analyzes PHP code for...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.5k | +8 | PHP | 8/10 | 4d ago |
|
|
2.8k | — | PHP | 8/10 | 23h ago |
|
|
1.5k | — | PHP | 8/10 | 2w ago |
|
|
13.5k | — | PHP | 9/10 | 4d ago |
|
|
2.3k | — | PHP | 8/10 | 4d ago |
|
|
14k | — | PHP | 9/10 | 2d ago |
Both are PHP code quality tools. PHP-CS-Fixer focuses primarily on auto-fixing; PHPCS offers both detection and fixing. PHPCS is rule-driven (standard definitions), PHP-CS-Fixer is fixer-driven. Different philosophies; not direct replacements.
PHPStan is a static type analyzer; PHPCS is a style and standard enforcer. Orthogonal tools often used together. Different problem domains.
Custom rulesets and sniffs for PHPCS. Depends on PHPCS as a base. Not a competitor; an extension ecosystem member.
Standard definitions and sniffs for PHPCS. Also an ecosystem member, not a replacement.
Sniff library for PHPCS targeting version compatibility checks. Another ecosystem consumer, not a direct competitor.