Update on Drupal code metrics
Submitted by puregin on Tue, 11/20/2007 - 1:37pm. Drupal | SoftwareI spent some time over the past couple of weeks writing some PHP code to support static code analysis and collection of metrics. It's very much a work in progress, but if anyone is interested, it can be found on the Bryght public SVN repository, at https://svn.bryght.com/dev
This was partially inspired by some of the interesting stuff happening at Ohloh, as well as the growing necessity of having better models for estimation of costs, risks, and value for Drupal-based software projects.
I'm still in working on this, but here are some preliminary numbers:
- Drupal 4.7 contrib codebase (everything tagged DRUPAL-4-7 from the contrib repository): 2990 PHP files, 267 javascript files, 495 css files, 632 other files, for a total of 4,384 files analyzed. 45,248 KB of code in files considered; containing 874,838 lines of code and 23,790 function definitions. Total CoCoMo 'organic' model cost: $10,245,457 at $60,000 per year per developer.
- Drupal 5.3 core: 99 PHP files, 30 css, 11 javascript, 4 text files, for a total of 144 files. 1,900KB containing 54752 lines of code and 1597 function definitions. CoCoMo 'organic' model total cost @$60,000 p.a.: $654,996.
