Tool category

PHP metrics and architecture

Tools that measure complexity, coupling, dependencies, maintainability, churn, and other structural properties.

Tools in this category

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

Metrics and architecture

PHPInsights

Active

🔰 Instant PHP quality checks from your console

  • PHP
Type
Metrics
PHP
^8.3
License
MIT
Install
composer require --dev nunomaduro/phpinsights
Stars
5,647
Latest
v2.15.1
Last commit
Last release
Quick pros & cons for PHPInsights

ProSummarizes several PHP quality checks in one console report.

ConAggregate scores can hide why a rule matters.

Editorially reviewed

Official website currently unavailable

Metrics and architecture

PHP Metrics

Active

Beautiful and understandable static analysis tool for PHP

  • PHP
Type
Metrics
License
MIT
Install
composer require --dev phpmetrics/phpmetrics
Stars
2,619
Latest
v2.11.0
Last commit
Last release
Quick pros & cons for PHP Metrics

ProTurns code metrics into readable visual reports.

ConMetrics do not prescribe the right refactor.

Editorially reviewed

Metrics and architecture

PDepend

Active

Measuring PHP design quality and dependency structure

  • Code Quality
  • PHP
Type
Metrics
PHP
>=5.3.7
License
BSD-3-Clause
Install
composer require --dev pdepend/pdepend
Stars
964
Latest
3.1.0
Last commit
Last release
Quick pros & cons for PDepend

ProMeasures coupling, complexity, and maintainability in detail.

ConTeams must interpret the metrics and choose thresholds.

Editorially reviewed

Metrics and architecture

AST Metrics

Active

Multi-language architecture, dependency, complexity, and code-structure metrics.

  • Code Quality
  • Static Analysis
Type
Metrics
License
MIT
Stars
172
Latest
v0.43.1
Last commit
Last release
Quick pros & cons for AST Metrics

ProMaps architecture and metrics across several languages.

ConMetrics highlight risk; they do not prove defects.

Editorially reviewed

Metrics and architecture

PhpCodeArcheology

Active

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
Stars
94
Latest
v2.11.2
Last commit
Last release
Quick pros & cons for PhpCodeArcheology

ProCombines metrics, dependency graphs, and Git churn.

ConIts broad reports require interpretation and prioritization.

Editorially reviewed

Metrics and architecture

php-class-dependencies-analyzer

Active

This tool allows you to monitor the dependencies and instability of your classes

  • Code Quality
  • PHP
  • Static Analysis
Type
Metrics
Stars
21
Latest
-
Last commit
Last release
Unknown
Quick pros & cons for php-class-dependencies-analyzer

ProTracks class dependencies and instability.

ConIt covers one dimension of maintainability.

Editorially reviewed

Metrics and architecture

churn-php

Inactive

Discover files in need of refactoring.

  • PHP
Type
Metrics
PHP
>=7.1.3
License
MIT
Install
composer require --dev bmitch/churn-php
Stars
1,385
Latest
1.7.3
Last commit
Last release
Quick pros & cons for churn-php

ProCombines churn and complexity to rank refactoring targets.

ConIts ranking identifies risk, not the required fix.

Editorially reviewed

Metrics and architecture

dePHPend

Inactive

Detect flaws in your architecture, before they drag you down into the depths of dependency hell ...

  • PHP
Type
Metrics
PHP
^8.2
License
MIT
Install
composer require --dev dephpend/dephpend
Stars
533
Latest
0.9.0
Last commit
Last release
Quick pros & cons for dePHPend

ProVisualizes dependencies that weaken an architecture.

ConIt focuses on dependency structure, not runtime behavior.

Editorially reviewed