How to read reports

1. Overview

Generate the HTML report is easy. Simply run:

vendor/bin/phpmetrics --report-html=/tmp/report.html

The HTML report is generated in the /tmp/report.html file.

The report is composed from different parts :

  1. The tabular area
  2. The Bubbles area
  3. The Custom chart area
  4. The Abstractness / Instability area
Preview of different areas in PhpMetrics report

When any information has color, PhpMetrics try to get your attention about significant information:

  • Green: all looks correct
  • Yellow: correct, but be careful
  • Red: anomaly detected

2. The tabular area

This area display main metrics for each package. Do not hesitate to click on the + button (on the left) in order to explore packages and to search specifc class.

You can hover titles of columns to get more description of the metric. Abbrevations are explained in the documentation.

Screenshot of the tabular area in HTML report - PhpMetrics

3. The Bubbles area

The bubbles area is the most "visual" part of the report.

  • Each file is symbolized by a circle
  • Size of the circle represents the Cyclomatic complexity
  • Color of the circle represents te Maintainability Index
  • Move your cursor on a circle to have details

Large red circles will be probably hard to maintain.

Screenshot of the bubbles area in HTML report - PhpMetrics

4. The Custom chart area

This area can display all charts you want. You just need to select, at the bottom, the datas you want to be displayed.

Screenshot of the tabular area in HTML report - PhpMetrics

5. The Abstractness / instability area

Do not hesitate to read this excellent documentation on the PDepend website. Screenshot of the Abstractness / instability area in HTML report - PhpMetrics