[TYPO3-dev] Metrics for TYPO3, FLOW3, Wordpress, Joomla, Drupal

Fabrizio Branca news at _REMOVETHIS_fabrizio-branca.de
Fri Dec 4 16:25:34 CET 2009


> What would be most interesting are the conclusions you could reach by 
> analyzing the data, not just the graphs. To me large number of files & 
> directories speak complexity (no surprise here), but it could also speak 
> more functionality (though that one is less direct)...

The absolute values are only for getting a rough idea what dimensions 
the projects have and how there are structured.

Drupal for example has a single class only and is organized completely 
in functions. This fact has some influence on the code quality in my 
opinion.

The most interesting values are the relative values:
For example the avarage ccn (Cyclomatic Complexity Number) per method or 
per lines of code. The ccn counts all control structures (if, 
switch,...) and given you an idea on how complex the methods are. 
Another approach (which will not be calculated by phploc, but by 
pdepend) is the npath complexity, which does not only count the control 
structures, but also takes into account how they are nested and counts 
all paths that are possible in your code.

These values can help you to spot snippets that should be refactored, 
but can give you only a hint on how code quality is. You need to find 
your own threshold values and interpretations of values.

Then, calculating those avarages for a complete project has only a 
little information value. Pdepend gives you those values on a per class 
and even per method basis. To compare complete projects with ccn per 
method-Values you should take the some max and variance values into account.

Bye,

Fabrizio




More information about the TYPO3-dev mailing list