PHP Static Analysis Tool - discover bugs in your code without running it!
PHP PHPStan Static Analysis
Type Analyzer
PHP ^7.4|^8.0
License MIT
Install composer require --dev phpstan/phpstan
⭐ Stars14,070
Latest 2.2.8
Last commit 2026-08-13
Last release 2026-08-04
Quick pros & cons for PHPStan
Pro Pairs mature type analysis with a large extension ecosystem.
Con Higher rule levels often need annotations and gradual adoption.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A PHP static analysis tool for finding errors and security vulnerabilities in PHP applications
Type Analyzer
PHP ~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 || ~8.5.0
License MIT
Install composer require --dev vimeo/psalm
⭐ Stars5,881
Latest 6.16.1
Last commit 2026-07-13
Last release 2026-03-19
Quick pros & cons for psalm
Pro Combines expressive types with taint and security analysis.
Con Advanced checks add annotation and configuration work.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
Type Analyzer
PHP >=7.2.0
License BSD-3-Clause
Install composer require --dev phpcsstandards/php_codesniffer
⭐ Stars1,545
Latest 4.0.4
Last commit 2026-08-06
Last release 2026-08-06
Quick pros & cons for PHP_CodeSniffer
Pro Supports established standards and detailed custom sniffs.
Con Large standards need configuration and can produce many findings.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A tool to automatically fix PHP Coding Standards issues
Type Fixer
PHP ^7.4 || ^8.0
License MIT
Install composer require --dev friendsofphp/php-cs-fixer
⭐ Stars13,547
Latest v3.95.18
Last commit 2026-08-09
Last release 2026-07-30
Quick pros & cons for PHP CS Fixer
Pro Offers a broad catalog of automatic coding-standard fixes.
Con Broad rule changes can create large review diffs.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
Type Fixer
PHP ^7.4|^8.0
License MIT
Install composer require --dev rector/rector
⭐ Stars10,400
Latest 2.6.2
Last commit 2026-08-13
Last release 2026-08-12
Quick pros & cons for Rector
Pro Automates PHP upgrades and repeatable AST refactoring.
Con Generated refactors still require tests and code review.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Keep your architecture clean.
Type Analyzer
PHP ^8.2
License MIT
Install composer require --dev deptrac/deptrac
⭐ Stars2,989
Latest 4.7.1
Last commit 2026-07-23
Last release 2026-07-23
Quick pros & cons for Deptrac
Pro Turns layer and module boundaries into repeatable CI checks.
Con The dependency map must stay aligned with the architecture.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A PHP parser written in PHP
Type Library
PHP >=7.4
License BSD-3-Clause
Install composer require nikic/php-parser
⭐ Stars17,450
Latest v5.8.0
Last commit 2026-07-11
Last release 2026-07-04
Quick pros & cons for PHP Parser
Pro Provides a mature PHP AST and traversal API.
Con It produces syntax structures, not high-level findings.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.
Type Analyzer
License LGPL-2.1
⭐ Stars16,206
Latest v1.173.0
Last commit 2026-08-13
Last release 2026-08-13
Quick pros & cons for Semgrep
Pro Makes custom security rules concise and language-friendly.
Con Deep PHP type and framework semantics are limited.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Laravel projects that want a low-configuration formatter with framework-oriented defaults.
Type Fixer
PHP ^8.2.0
License MIT
Pricing Free and open source
Install composer require laravel/pint --dev
⭐ Stars3,148
Latest v1.30.5
Last commit 2026-08-13
Last release 2026-08-10
Quick pros & cons for Laravel Pint
Pro Provides Laravel-oriented formatting defaults with minimal configuration.
Con Its opinionated defaults offer less control than configuring PHP-CS-Fixer directly.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
⚗️ Adds code analysis to Laravel improving developer productivity and code quality.
Type Extension
PHP ^8.2
License MIT
Install composer require --dev larastan/larastan
⭐ Stars6,483
Latest v3.10.0
Last commit 2026-08-11
Last release 2026-05-28
Quick pros & cons for Larastan
Pro Teaches PHPStan about Laravel containers, facades, and models.
Con It depends on PHPStan and Laravel-specific configuration.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server.
Type Analyzer
License MIT
⭐ Stars5,999
Latest v4.3.0
Last commit 2026-08-13
Last release 2026-08-13
Quick pros & cons for jscpd
Pro Detects duplication across PHP and hundreds of other formats.
Con Generated code and boilerplate need threshold tuning.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
🔰 Instant PHP quality checks from your console
Type Metrics
PHP ^8.3
License MIT
Install composer require --dev nunomaduro/phpinsights
⭐ Stars5,629
Latest v2.14.2
Last commit 2026-08-04
Last release 2026-04-12
Quick pros & cons for PHPInsights
Pro Summarizes several PHP quality checks in one console report.
Con Aggregate scores can hide why a rule matters.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Official website currently unavailable
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Type Analyzer
PHP ^8.1.0
Install composer require --dev phan/phan
⭐ Stars5,622
Latest 6.0.7
Last commit 2026-08-09
Last release 2026-06-22
Quick pros & cons for Phan
Pro Prioritizes low false-positive AST-based type analysis.
Con It requires the php-ast extension and careful configuration.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Running a project’s PHP quality tools before code is committed
Type Orchestrator
PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
License MIT
Install composer require --dev phpro/grumphp
⭐ Stars4,308
Latest v2.23.0
Last commit 2026-08-11
Last release 2026-07-22
Quick pros & cons for GrumPHP
Pro Runs the project's quality tools before commit and in CI.
Con It orchestrates analyzers rather than adding its own checks.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Mago is a toolchain for PHP that aims to provide a set of tools to help developers write better code.
Type Analyzer
PHP ~8.1 || ~8.2 || ~8.3 || ~8.4 || ~8.5 || ~8.6
License Apache-2.0
Install composer require --dev carthage-software/mago
⭐ Stars3,375
Latest 1.46.0
Last commit 2026-08-13
Last release 2026-08-05
Quick pros & cons for mago
Pro Combines fast linting, analysis, and formatting in one toolchain.
Con Its ecosystem is younger than established PHP analyzers.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Polyglot teams that want one local and CI workflow around PHPStan, PHPCS, PHP-CS-Fixer, Semgrep, and other tools.
Code Quality PHP Static Analysis
Type Orchestrator
PHP PHP 5+ for maintainability and coverage; individual plugins have their own requirements.
License Business Source License 1.1 with delayed open-source publication
Pricing Qlty CLI is free for all use; Qlty Cloud has separate service plans.
Install Install a native Qlty CLI binary using the official installer or release archive.
⭐ Stars3,118
Latest v0.641.0
Last commit 2026-08-11
Last release 2026-08-03
Quick pros & cons for Qlty
Pro Unifies PHP linters, formatters, security checks, metrics, and coverage in a polyglot CLI.
Con The CLI uses a Fair Source BSL license rather than an OSI-approved open-source license.
Evidence: Source 1 ↗ Source 2 ↗
Editorially reviewed 2026-08-08
🔎 Static code analysis engine to find security issues in code.
Type Analyzer
License LGPL-2.1
⭐ Stars2,938
Latest v1.27.0
Last commit 2026-08-12
Last release 2026-08-12
Quick pros & cons for Opengrep
Pro Uses source-like rules for custom security checks.
Con Custom rules need tuning to control false positives.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
WordPress core, plugin, and theme projects enforcing ecosystem conventions in CI.
Type Ruleset
PHP >=7.2
License MIT
Pricing Free and open source
Install composer require --dev wp-coding-standards/wpcs
⭐ Stars2,822
Latest 3.4.1
Last commit 2026-08-10
Last release 2026-07-27
Quick pros & cons for WordPress Coding Standards
Pro Applies the official WordPress PHP conventions through the familiar PHPCS workflow.
Con Its conventions are specific to WordPress projects and require PHP_CodeSniffer.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Beautiful and understandable static analysis tool for PHP
Type Metrics
License MIT
Install composer require --dev phpmetrics/phpmetrics
⭐ Stars2,608
Latest v2.11.0
Last commit 2026-08-12
Last release 2026-08-09
Quick pros & cons for PHP Metrics
Pro Turns code metrics into readable visual reports.
Con Metrics do not prescribe the right refactor.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
Type Analyzer
PHP >=5.3.9
License BSD-3-Clause
Install composer require --dev phpmd/phpmd
⭐ Stars2,444
Latest 2.15.0
Last commit 2026-08-11
Last release 2023-12-11
Quick pros & cons for PHP Mess Detector
Pro Catches complexity, naming, and maintainability problems.
Con Default rules can be noisy on existing codebases.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP Compatibility check for PHP_CodeSniffer
Type Ruleset
PHP >=5.3
License LGPL-3.0
Install composer require --dev phpcompatibility/php-compatibility
⭐ Stars2,299
Latest 9.3.5
Last commit 2026-08-13
Last release 2019-12-27
Quick pros & cons for PHP Compatibility
Pro Checks code against a target PHP version range.
Con It needs PHP_CodeSniffer and cannot prove runtime compatibility.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Mainly a PHP Language Server with more features than you can shake a stick at
Type Extension
PHP ^8.2
License MIT
Install composer require --dev phpactor/phpactor
⭐ Stars1,912
Latest 2026.07.22.0
Last commit 2026-08-11
Last release 2026-07-22
Quick pros & cons for Phpactor
Pro Combines a PHP language server with refactoring tools.
Con Its editor-focused setup can feel heavy for CI-only use.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
ECS runs PHP-CS-Fixer and PHP_CodeSniffer as a single, parallel fast tool with zero dependencies. Run on PHP 7.2+
Type Orchestrator
License MIT
⭐ Stars1,620
Latest 13.2.15
Last commit 2026-08-11
Last release 2026-07-22
Quick pros & cons for EasyCodingStandard
Pro Runs PHP-CS-Fixer and PHP_CodeSniffer from one config.
Con Its wrapper adds another configuration layer.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Analyzer and documentation-tool authors who need a maintained PHPDoc AST.
PHP PHPStan Static Analysis
Type Library
PHP PHP 7.4 or PHP 8.x
License MIT
Pricing Free and open source
Install composer require phpstan/phpdoc-parser
⭐ Stars1,532
Latest 2.3.3
Last commit 2026-08-12
Last release 2026-07-08
Quick pros & cons for PHPStan PHPDoc Parser
Pro Provides a maintained PHPDoc AST with generics and advanced type syntax.
Con It is a parser library, not a ready-to-run analyzer.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Deep PHP code inspections directly in JetBrains IDEs
Type Extension
Delivery PhpStorm and IntelliJ IDEA Ultimate plugin
⭐ Stars1,485
Latest -
Last commit 2026-07-09
Last release Unknown
Quick pros & cons for PHP Inspections (EA Extended)
Pro Adds broad PHP inspections and quick fixes inside JetBrains IDEs.
Con It requires a supported JetBrains IDE.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Teams building a strict, project-specific PHPCS standard with many automatically fixable rules.
Type Ruleset
PHP ^7.4 || ^8.0
License MIT
Pricing Free and open source
Install composer require --dev slevomat/coding-standard
⭐ Stars1,480
Latest 8.31.1
Last commit 2026-07-31
Last release 2026-07-31
Quick pros & cons for Slevomat Coding Standard
Pro Offers a broad PHPCS ruleset spanning safety, cleanup, formatting, and autofix.
Con Its large and evolving rule catalog needs an explicitly pinned project ruleset.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Running a ready-made PHP analysis toolchain in Docker
Code Quality PHP PHPStan Static Analysis
Type Orchestrator
License MIT
⭐ Stars1,319
Latest v1.124.1
Last commit 2026-08-13
Last release 2026-08-03
Quick pros & cons for jakzal/phpqa
Pro Bundles a maintained PHP analysis toolchain in Docker.
Con The Docker image is heavier than installing one focused tool.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
✔️ PHP Architecture Tester - Easy architecture testing for PHP
Type Analyzer
PHP ^8.1
License MIT
Install composer require --dev carlosas/phpat
⭐ Stars1,274
Latest 0.12.4
Last commit 2026-08-10
Last release 2026-03-17
Quick pros & cons for PHP Architecture Tester
Pro Expresses architecture constraints as readable PHP tests.
Con Its rule ecosystem is smaller than older architecture tools.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
:crystal_ball: Better Reflection is a reflection API that aims to improve and provide more features than PHP's built-in reflection API.
Type Library
PHP ~8.4.1 || ~8.5.0
License MIT
Install composer require roave/better-reflection
⭐ Stars1,246
Latest 6.72.0
Last commit 2026-08-13
Last release 2026-07-22
Quick pros & cons for Better Reflection
Pro Inspects source without loading the reflected classes.
Con It is a building block, not a ready-made analyzer.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
🎵 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
⭐ Stars1,117
Latest 2.52.0
Last commit 2026-08-09
Last release 2026-05-15
Quick pros & cons for composer-normalize
Pro Keeps composer.json formatting deterministic.
Con It only checks and rewrites composer.json.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A CLI tool to check whether a specific composer package uses imported symbols that aren't part of its direct composer dependencies
Type Analyzer
PHP ~8.4.0 || ~8.5.0
License MIT
Install composer require --dev maglnet/composer-require-checker
⭐ Stars1,009
Latest 4.24.0
Last commit 2026-08-11
Last release 2026-03-20
Quick pros & cons for Composer Require Checker
Pro Finds symbols used without a direct Composer dependency.
Con Dynamic symbols can require allowlists.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Analyzer authors who need the engine AST; Phan is a prominent consumer.
Type Library
PHP >= 7.2.0
License BSD-3-Clause
Pricing Free and open source
Install pecl install ast
⭐ Stars982
Latest v1.1.3
Last commit 2026-06-27
Last release 2025-08-10
Quick pros & cons for php-ast
Pro Exposes the PHP engine's native AST with low parsing overhead.
Con It is a native extension and consumers must build the actual analysis.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Measuring PHP design quality and dependency structure
Type Metrics
PHP >=5.3.7
License BSD-3-Clause
Install composer require --dev pdepend/pdepend
⭐ Stars958
Latest 2.16.2
Last commit 2026-08-02
Last release 2023-12-17
Quick pros & cons for PDepend
Pro Measures coupling, complexity, and maintainability in detail.
Con Teams must interpret the metrics and choose thresholds.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Put your architectural rules under test!
Type Analyzer
PHP ^8.0
License MIT
Install composer require --dev phparkitect/phparkitect
⭐ Stars924
Latest 1.3.0
Last commit 2026-08-13
Last release 2026-07-31
Quick pros & cons for PHPArkitect
Pro Keeps architecture rules beside the project's test code.
Con Teams must define enough rules to cover the design.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
🔨 Prefixes all PHP namespaces in a file/directory to isolate the code bundled in PHARs.
Type Fixer
PHP ^8.2
License MIT
Install composer require --dev humbug/php-scoper
⭐ Stars806
Latest 0.18.19
Last commit 2026-07-06
Last release 2026-03-02
Quick pros & cons for php-scoper
Pro Isolates bundled PHP code by prefixing namespaces.
Con Dynamic names and bundled resources still need testing.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Symfony applications that need PHPStan to understand containers, console commands, forms, Messenger, and framework return types.
PHP PHPStan Static Analysis Symfony
Type Extension
PHP ^7.4 || ^8.0
License MIT
Pricing Free and open source
Install composer require --dev phpstan/phpstan-symfony
⭐ Stars793
Latest 2.0.20
Last commit 2026-08-12
Last release 2026-06-16
Quick pros & cons for PHPStan Symfony
Pro Teaches PHPStan about Symfony containers, console commands, forms, and Messenger.
Con Advanced checks require generated Symfony container metadata and framework-specific setup.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Teams that have adopted PHPStan and want stronger correctness constraints than the default configuration.
PHP PHPStan Static Analysis
Type Ruleset
PHP ^7.4 || ^8.0
License MIT
Pricing Free and open source
Install composer require --dev phpstan/phpstan-strict-rules
⭐ Stars704
Latest 2.0.12
Last commit 2026-08-12
Last release 2026-07-19
Quick pros & cons for PHPStan Strict Rules
Pro Enables a maintained set of stricter correctness rules with little setup.
Con Opinionated rules can create substantial adoption work in an existing codebase.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
🚀 Fast detection of composer dependency issues (unused dependencies, shadow dependencies, misplaced dependencies)
Type Analyzer
PHP ^7.2 || ^8.0
License MIT
Install composer require --dev shipmonk/composer-dependency-analyser
⭐ Stars626
Latest 1.8.4
Last commit 2026-08-11
Last release 2025-11-25
Quick pros & cons for composer-dependency-analyser
Pro Finds unused, shadowed, and misplaced Composer dependencies.
Con It does not replace type or behavior analysis.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Library maintainers enforcing semantic-versioning compatibility in CI.
API compatibility PHP Static Analysis
Type Analyzer
PHP ~8.4.0 || ~8.5.0
License MIT
Pricing Free and open source
Install composer require --dev roave/backward-compatibility-check
⭐ Stars601
Latest 8.21.0
Last commit 2026-08-13
Last release 2026-05-15
Quick pros & cons for Roave Backward Compatibility Check
Pro Turns PHP API compatibility changes into an enforceable CI check.
Con It depends on Git history and SemVer tags and cannot detect every behavioral compatibility break.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
JavaScript and Node.js tooling that needs to parse PHP without running PHP.
Type Library
License BSD-3-Clause
⭐ Stars563
Latest v3.7.0
Last commit 2026-08-11
Last release 2026-06-10
Quick pros & cons for Glayzzle PHP Parser (Node.js)
Pro Exposes PHP tokens and an AST to Node.js tools.
Con It is a JavaScript parser, not a complete analyzer.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Detecting AI-code mistakes and quality regressions before merge
Code Quality PHP Static Analysis
Type Analyzer
License MIT
⭐ Stars549
Latest v0.14.1
Last commit 2026-08-08
Last release 2026-08-08
Quick pros & cons for aislop
Pro Finds common AI-code mistakes with deterministic rules.
Con Heuristic findings still need human review.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Local pull-request scanning for dead code and security issues
Code Quality PHP Static Analysis
Type Analyzer
License Apache-2.0
⭐ Stars536
Latest v4.33.2
Last commit 2026-08-13
Last release 2026-08-09
Quick pros & cons for Skylos
Pro Scans pull requests locally for dead code and security issues.
Con Its broad PR checks may need repository-specific tuning.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Large PHP applications that need framework-aware dead-code detection and optional removal.
Dead Code PHP PHPStan Static Analysis
Type Extension
PHP 1.x requires PHP 8.1+; 0.x supports PHP 7.4–8.5
License MIT
Pricing Free and open source
Install composer require --dev shipmonk/dead-code-detector
⭐ Stars502
Latest 1.3.3
Last commit 2026-08-07
Last release 2026-08-07
Quick pros & cons for ShipMonk Dead Code Detector
Pro Finds transitive and framework-driven dead code and can remove selected findings.
Con Dynamic framework behavior may still require configuration or custom usage providers.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Applications and libraries preventing new deprecated API usage during upgrades.
PHP PHPStan Static Analysis
Type Ruleset
PHP ^7.4 || ^8.0
License MIT
Pricing Free and open source
Install composer require --dev phpstan/phpstan-deprecation-rules
⭐ Stars458
Latest 2.0.5
Last commit 2026-08-12
Last release 2026-07-27
Quick pros & cons for PHPStan Deprecation Rules
Pro Detects deprecated APIs and supports project-defined deprecation markers.
Con It only reports deprecations that metadata, stubs, or extensions declare.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP quality and security analysis in the SonarQube ecosystem
Code Quality PHP Static Analysis
Type Analyzer
Delivery Analyzer for SonarQube Server and SonarQube for IDE
⭐ Stars430
Latest 3.60.0.16641
Last commit 2026-08-11
Last release 2026-08-03
Quick pros & cons for SonarQube PHP
Pro Brings PHP quality and security rules into SonarQube.
Con It ties analysis to the SonarQube ecosystem.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Library that find out the minimum version and the extensions required for a piece of code to run
Type Analyzer
⭐ Stars380
Latest 7.2.6
Last commit 2026-05-20
Last release 2026-04-22
Quick pros & cons for php-compat-info
Pro Finds the minimum PHP version and extensions code requires.
Con Runtime and environment behavior remain outside its scope.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
This tool check syntax of PHP files faster than serial check with fancier output.
Type Analyzer
PHP >=5.3.0
Install composer require --dev php-parallel-lint/php-parallel-lint
⭐ Stars356
Latest v1.4.0
Last commit 2026-07-26
Last release 2024-03-27
Quick pros & cons for PHP-Parallel-Lint (maintained)
Pro Checks PHP syntax quickly across many files.
Con It checks syntax only.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP applications that want SQL errors and database access-layer type problems caught during PHPStan analysis.
PHP PHPStan Sql Static Analysis
Type Extension
PHP ^7.4 || ^8.0
License MIT
Pricing Free and open source
Install composer require --dev staabm/phpstan-dba
⭐ Stars297
Latest 0.4.10
Last commit 2026-08-12
Last release 2026-08-12
Quick pros & cons for phpstan-dba
Pro Adds SQL validation and database result type inference to an existing PHPStan workflow.
Con Database-specific inference adds configuration and does not replace runtime integration tests.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A Control Flow Graph implementation in PHP
Type Library
PHP >=7.4
License MIT
Install composer require ircmaxell/php-cfg
⭐ Stars246
Latest V0.8.1
Last commit 2026-08-01
Last release 2025-08-17
Quick pros & cons for PHP-cfg
Pro Builds control-flow graphs for custom PHP analysis.
Con Consumers must build the actual analysis on top.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Static Analysis Results Baseliner
Type Orchestrator
PHP >=8.2 <8.6
License MIT
Install composer require --dev dave-liddament/sarb
⭐ Stars165
Latest 1.11.0
Last commit 2026-07-12
Last release 2026-07-11
Quick pros & cons for Static Analysis Results Baseliner
Pro Creates manageable baselines for existing analysis debt.
Con A baseline records debt instead of fixing it.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Performant static analyzer for PHP, which is extremely easy to use. It helps you catch common mistakes in your PHP code.
Type Analyzer
License MIT
Install composer require --dev denzyl/phanalist
⭐ Stars161
Latest v1.1.10
Last commit 2026-08-13
Last release 2026-07-25
Quick pros & cons for phanalist
Pro Offers a fast, low-setup check for common PHP mistakes.
Con Its rule set and integrations remain relatively small.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Multi-language architecture, dependency, complexity, and code-structure metrics.
Code Quality Static Analysis
Type Metrics
License MIT
⭐ Stars152
Latest v0.42.0
Last commit 2026-08-13
Last release 2026-08-13
Quick pros & cons for AST Metrics
Pro Maps architecture and metrics across several languages.
Con Metrics highlight risk; they do not prove defects.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Reflection library to do Static Analysis for PHP Projects
Type Library
PHP 8.2.*|8.3.*|8.4.*|8.5.*
License MIT
Install composer require phpdocumentor/reflection
⭐ Stars125
Latest 7.0.0
Last commit 2026-08-10
Last release 2026-05-28
Quick pros & cons for Reflection
Pro Resolves code and DocBlock types without executing source.
Con It is a library rather than a standalone checker.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP static analysis for architecture & maintainability — 60+ metrics, complexity analysis, dependency graphs, git churn hotspots, and AI-ready MCP server. Alternative to PHPMetrics.
Code Quality PHP Static Analysis
Type Metrics
License MIT
⭐ Stars87
Latest v2.11.2
Last commit 2026-08-08
Last release 2026-07-27
Quick pros & cons for PhpCodeArcheology
Pro Combines metrics, dependency graphs, and Git churn.
Con Its broad reports require interpretation and prioritization.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A tool to verify that your files are in harmony with your .editorconfig
Type Analyzer
PHP ^7.2 || ^8.0
License MIT
Install composer require --dev editorconfig-checker/editorconfig-checker
⭐ Stars75
Latest 10.7.0
Last commit 2026-08-10
Last release 2025-03-17
Quick pros & cons for editorconfig-checker
Pro Verifies EditorConfig rules across a repository.
Con It enforces basic formatting rules, not PHP semantics.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
🏥 PHPDoctor: Check files, full directories or strings for missing or bad PHPDoc types.
Type Analyzer
PHP >=8.1
License Apache-2.0
Install composer require --dev voku/phpdoctor
⭐ Stars53
Latest 0.8.0
Last commit 2026-07-10
Last release 2026-04-26
Quick pros & cons for PHPDoctor
Pro Finds missing or inconsistent PHPDoc types.
Con It covers PHPDoc types, not general correctness.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Fast & simple tool to find class duplicates in your projects.
Type Analyzer
PHP ^7.2 || ^8.0
License MIT
Install composer require --dev shipmonk/name-collision-detector
⭐ Stars35
Latest 2.1.1
Last commit 2026-06-23
Last release 2024-03-01
Quick pros & cons for name-collision-detector
Pro Finds duplicate class names with a narrow, fast check.
Con It checks duplicate names, not wider code quality.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Show unused composer dependencies by scanning your code
Type Analyzer
PHP ^8.1
License MIT
Install composer require --dev icanhazstring/composer-unused
⭐ Stars1,684
Latest 0.9.6
Last commit 2026-04-27
Last release 2026-01-30
Quick pros & cons for Composer-Unused
Pro Quickly flags Composer packages that code may not use.
Con Dynamic package use may require exclusions.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP Magic Number Detector
Type Analyzer
PHP ^7.4 || ^8.0
License MIT
Install composer require --dev povils/phpmnd
⭐ Stars586
Latest v3.6.1
Last commit 2026-02-25
Last release 2026-02-21
Quick pros & cons for PHP Magic Number Detector
Pro Targets unexplained numeric literals with one focused rule set.
Con Teams often need project-specific exclusions.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Tighten linter for Laravel conventions.
Type Ruleset
PHP >=8.1
License MIT
Install composer require --dev tightenco/tlint
⭐ Stars526
Latest v9.6.1
Last commit 2026-04-30
Last release 2026-04-30
Quick pros & cons for TLint
Pro Checks Laravel code against Tighten's conventions.
Con Its rules target Laravel projects.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
PHP language analyses in Rascal
Type Analyzer
License BSD-2-Clause
⭐ Stars29
Latest v1.1.0
Last commit 2026-05-13
Last release 2017-12-23
Quick pros & cons for PHP Analysis
Pro Supports custom PHP language research in Rascal.
Con It requires Rascal and targets specialist use cases.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Static type checker for PHP relying on the php-ast PECL extension. Mirrored from Codeberg.org
Type Analyzer
⭐ Stars0
Latest -
Last commit 2026-04-08
Last release Unknown
Quick pros & cons for PHP Static Type Checker
Pro Provides focused type checks through PHP's native AST.
Con It depends on php-ast and has a small ecosystem.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Discover files in need of refactoring.
Type Metrics
PHP >=7.1.3
License MIT
Install composer require --dev bmitch/churn-php
⭐ Stars1,376
Latest 1.7.3
Last commit 2025-12-31
Last release 2026-01-02
Quick pros & cons for churn-php
Pro Combines churn and complexity to rank refactoring targets.
Con Its ranking identifies risk, not the required fix.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Pretty fast linter (code static analysis utility) for PHP
Type Analyzer
PHP >=7.1
License MIT
Install composer require --dev vkcom/noverify
⭐ Stars688
Latest v0.5.5
Last commit 2026-01-19
Last release 2025-04-22
Quick pros & cons for noverify
Pro Runs PHP lint checks quickly from a standalone binary.
Con Its rule ecosystem is smaller than PHP-native leaders.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Analyze PHP code with one command
Type Orchestrator
PHP >=5.4
License MIT
Install composer require --dev edgedesign/phpqa
⭐ Stars564
Latest v1.27.2
Last commit 2025-11-22
Last release 2025-11-22
Quick pros & cons for PHPQA
Pro Runs a broad PHP quality toolchain with one command.
Con Bundled tools still need individual configuration.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Detect flaws in your architecture, before they drag you down into the depths of dependency hell ...
Type Metrics
PHP ^8.2
License MIT
Install composer require --dev dephpend/dephpend
⭐ Stars532
Latest 0.9.0
Last commit 2026-01-28
Last release 2025-10-05
Quick pros & cons for dePHPend
Pro Visualizes dependencies that weaken an architecture.
Con It focuses on dependency structure, not runtime behavior.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Detecting source-level API compatibility changes before publishing a PHP package release.
Type Analyzer
PHP ^8.1
License MIT
Install composer require --dev tomzx/php-semver-checker
⭐ Stars436
Latest v0.17.0
Last commit 2026-02-05
Last release 2025-10-30
Quick pros & cons for PHP Semantic Versioning Checker
Pro Suggests version changes from source-level API differences.
Con Dynamic behavior and documentation changes may escape detection.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A static analysis tool for security
Type Analyzer
PHP >=8.3
License MIT
Install composer require --dev designsecurity/progpilot
⭐ Stars365
Latest v1.3.0
Last commit 2025-08-17
Last release 2025-08-17
Quick pros & cons for Progpilot
Pro Tracks tainted data to find PHP security flaws.
Con Security findings need framework-aware tuning and review.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
A combined runtime/static code-analysis tool, that can trace parameter types
Type Analyzer
License MIT
⭐ Stars85
Latest -
Last commit 2026-01-28
Last release Unknown
Quick pros & cons for PHP Weaver
Pro Combines runtime traces with static type information.
Con Runtime traces only cover executed paths.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Uses complexity metrics to determine which functions need documentation.
Type Analyzer
License MIT
Install composer require --dev niels-de-blaauw/php-doc-check
⭐ Stars43
Latest v0.4.1
Last commit 2025-12-16
Last release 2025-12-16
Quick pros & cons for PHP Doc Check
Pro Uses complexity to focus documentation effort.
Con Complexity is only a proxy for documentation value.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
This tool allows you to monitor the dependencies and instability of your classes
Type Metrics
⭐ Stars21
Latest -
Last commit 2026-01-06
Last release Unknown
Quick pros & cons for php-class-dependencies-analyzer
Pro Tracks class dependencies and instability.
Con It covers one dimension of maintainability.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08
Adjacent test-quality gating for critical methods and newly changed PHP code.
Type Analyzer
PHP ^8.1
License MIT
Install composer require --dev shipmonk/coverage-guard
⭐ Stars56
Latest 1.1.0
Last commit 2026-07-17
Last release 2026-07-17
Quick pros & cons for Coverage Guard
Pro Enforces coverage on critical methods or newly changed code.
Con It needs coverage files and CI configuration.
Evidence: Source 1 ↗
Editorially reviewed 2026-08-08