PhpMetrics is a free, open source monitoring & observability project written in PHP and released under MIT. It has 2,612 GitHub stars, 261 forks and 4 open issues, and was last pushed 27 days ago. On this registry it ranks #129 of 191 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available.

PhpMetrics

Packagist Downloads License Latest Stable Version

Standard report

PhpMetrics

PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report.

Documentation | Twitter | Contributing



Quick start

Follow the quick start guide to get started.

# install the package as a dev dependency
composer require phpmetrics/phpmetrics --dev

# run PHPMetrics to analyze a folder and generate a report
php ./vendor/bin/phpmetrics --report-html=myreport <folder-to-analyze>

Then open the generated ./myreport/index.html file in your browser.

You can use a configuration file to customize the report, add options, configure rules for Continuous Integration, etc.

Metrics

You'll find detailed list of metrics in documentation, or running php ./vendor/bin/phpmetrics --metrics

Author

  • Jean-François Lépine

License

See the LICENSE file.

Contributing

See the CONTRIBUTING file.

Support the project

PHPMetrics is built and maintained on free time. If it saved you some of yours:

  • Star the repository. It costs nothing and it is how most developers discover the tool.
  • ❤️ Become a sponsor. Sponsorship directly funds maintenance time and the addition of new features and metrics.

Frequently asked questions

Is PhpMetrics free to use?

PhpMetrics is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does PhpMetrics do?

Beautiful and understandable static analysis tool for PHP

What is PhpMetrics written in?

PhpMetrics is primarily written in PHP. Its source is publicly available at https://github.com/phpmetrics/PhpMetrics, and it has 2,612 GitHub stars.