Good PHP Metric tools

mauro.dec picture mauro.dec · Aug 19, 2009 · Viewed 11k times · Source

I have been coding in PHP for a while using Netbeans but it does not provide any tools for obtaining code metrics. I have also used SourceMonitor before but it does not support PHP, same with Code Analyzer.

Has anyone used and can recommend any tools for getting code metrics from PHP code?

Answer

Ira Baxter picture Ira Baxter · Aug 24, 2009

My company provides a variety of PHP tools for measuring software quality, both statically and dynamically.

The SD Source Code Search Engine is an interactive GUI that allows you to search across large bodies of source code (e.g., PHP and HTML) quickly and easily. It provides fast searches by indexing the source code base first.

As a side effect of the indexing process, it also produces metrics for the files it scans, including SLOC, Comments, Whitespace, Cyclomatic and Halstead measures.

The CloneDR is a tool that finds exact and near-miss duplicated code across large software systems. It has been used to find clones in PHP code.

The SD Test Coverage tool for PHP is a tool that determines what part of your PHP application has been executed for any reason, including executed because of testing. It provides coverage information in both report form and UI form overlayed over the source code.

EDIT 4/1/2011 (Seriously!)

The SD Profiler for PHP provides profiling capability to determine which part of your code is expensive. We offer both counting profilers that provide execution counts for individual statements, and timing profiles, that provide time costs of individual function bodies and of call subtrees underneath a specific function, as well as call graph information.