Cognitive Code Analysis review
A free, self-hosted PHP analyzer for complexity metrics, baselines, and hotspots.
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Cognitive Code Analysis is an open-source command-line tool from Phauthentic for analyzing PHP codebases. It calculates cognitive complexity at class and method level, and can also calculate cyclomatic and Halstead metrics when enabled. Its focus is useful for solo developers and teams that want complexity and churn reports without a paid plan, provided they are comfortable running analysis in a self-hosted workflow.
The analysis goes beyond a single complexity score. Configurable thresholds and weights let teams shape how results are assessed, while baseline comparisons show changes against an earlier result. Churn analysis uses version-control history, such as Git, to identify hotspots where complexity and code changes meet. An optional result cache is available. Together, these features suit teams that want to inspect code health over time; it is less suited to buyers seeking an IDE-based feedback loop or built-in pull-request gates.
Reporting is a notable strength for teams with existing pipelines: outputs include JSON, CSV, HTML, Markdown, Checkstyle XML, JUnit XML, SARIF, GitLab Code Quality, and GitHub Actions formats. The tool is self-hosted, with community support, and its PHP scope means projects in other languages need a separate option; the repository points to distinct C# and Java versions. Choose it for configurable PHP analysis and portable reports, but look elsewhere if one analyzer must cover multiple languages or provide IDE feedback and pull-request gating.
Cognitive Code Analysis pros and cons
- Where it wins
- Measures cognitive complexity, with cyclomatic and Halstead metrics available.
- Baseline comparisons and churn analysis help surface code hotspots.
- Exports to JSON, CSV, HTML, Markdown, SARIF, and CI report formats.
- Where it doesn't
- Analyzes PHP only; C# and Java versions are separate tools.
- Self-hosted deployment requires running the command-line tool.
- No IDE feedback or pull-request gates are listed.
Cognitive Code Analysis fact sheet, pricing and score →
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update