Search code examples
phpmetricscode-metrics

Calculate software metrics for PHP projects


I would like to calculate some code metrics for my PHP OOP projects. I try to use some of the tools mentioned in here. But except trail version of Understand, which presents only

  • number of code, comment, blank lines
  • number of classes number of file
  • number of functions number of
  • declarative/executable statements

I couldn't find any working for PHP.

Plugin for Eclipse by State of Flow is not working with my (not so new) Galileo Eclipse v3.5.

I'm interested in measures such as

  • depth of inheritance tree,
  • avg function length,
  • weighted methods per class,
  • duplications,
  • ...

Are there any tools?


Solution

  • PHP Depend generates some nice metrics for you.