Module code review metrics

I recently made a list of a whole bunch of modules I was interested in, and wanted to gain a quick overview of how they followed Drupal's coding standards. While this is obviously only one metric and there are many others possible (issue queue length, manual code review, simpletests etc), it is a useful and simple way to to get started.

Doing this can help you in module selection (e.g. when choosing between 2 modules that do similar things), can warn you away from any modules that would be a nightmare to maintain, and can help you decide where you should spend you energy fixing things up.

Before I go any further, I should make it very clear that I think all the modules below are great (I only chose ones I liked!), that there are many things to be taken into consideration when looking at a module, and that of course there are many perfectly valid reasons for deviating from the standards.

First I wrote a small addon module for coder to create the listings. To create a somewhat representative sort order, I created a weighted score, where a 'minor' issue is 1 point, a 'normal' is 5, and a 'critical' is 20. This is completely arbitrary, but makes the list a bit easier to grok. It would be interesting to see if a 'per sloc' score could be deduced. The list below excludes .inc files, since I have a feeling that coder is including some .incs more than once in different places.

Interestingly most of the modules that score badly seem to have a relatively small number of issues repeated again - often simple things, like using tab indents, and mis-spacing string variable concatenation. Perhaps some friendly messages could be inserted into the drupal.org patch upload process! For modules that really need serious surgery however, the (now seriously improved!) coder format script is well worth a look.

Anyway, without further ado, here is the list for your perusal - enjoy... and get patching!

NameMinorNormalCriticalScore
cvs_deploy000100%
views_fastsearch000100%
cookie_check000100%
date000100%
date_api000100%
number000100%
views_filterblock000100%
optionwidgets000100%
ping000100%
content_copy000100%
coder000100%
civicrm_subscribe000100%
cck_fieldgroup_tabs000100%
service_links000100%
color000100%
content000100%
comment000100%
nodereference000100%
memcache000100%
job_queue000100%
jquery_update000100%
firebug000100%
jcarousel000100%
geshifilter000100%
hotkey000100%
geshinode000100%
legacy000100%
linktocontent000100%
linktocontent_menu000100%
linktocontent_node000100%
locale000100%
linktocontent_category000100%
feedapi_node000100%
fieldgroup000100%
feedapi_node_views000100%
watchdog000100%
revision_moderation000100%
update_status000100%
auto_nodetitle000100%
throttle000100%
usernode000100%
xmlsitemap_node000100%
xmlsitemap000100%
text000100%
xmlsitemap_engines000100%
tracker000100%
userpoints_workflow_ng000100%
tagadelic_views000100%
userreference000100%
swfobject000100%
text_captcha000100%
admin_menu000100%
adminrole000100%
blog000100%
avatar_selection000100%
casetracker_xmlrpc000100%
messagefx010100%
drush_tools010100%
menu010100%
user010100%
globalredirect010100%
image_captcha010100%
htmlpurifier010100%
journal010100%
jquery_interface010100%
autotimezone010100%
jstools010100%
feedapi_inherit010100%
nat010100%
search010100%
system010100%
poll010100%
taxonomy010100%
role_weights010100%
coder_metrics010100%
swftools_integrate010100%
block010100%
devel_generate010100%
onepixelout010100%
focus020100%
hierarchical_select020100%
community_tags020100%
content_taxonomy020100%
activemenu020100%
activesearch020100%
help020100%
headinganchors020100%
i18ncontent020100%
token020100%
cck_address_canada020100%
path020100%
lutman020100%
drupal020100%
book020100%
pathauto020100%
custom_breadcrumbs020100%
captcha020100%
ufo020100%
simpleviewer030100%
statistics030100%
taxonomy_redirect030100%
ttext030100%
views_rss030100%
googleanalytics030100%
contact030100%
drush030100%
forum030100%
collapsiblock030100%
wijering030100%
activeedit030100%
autosave030100%
drush_pm_wget04099%
ajaxsubmit04099%
asset_import04099%
macro04099%
blogapi04099%
votingapi00199%
path_redirect04099%
i18nviews04099%
profile05099%
content_taxonomy_activeselect05099%
swftools05099%
upload06099%
helptip06099%
talk06099%
i18nstrings06099%
drutex06099%
date_copy06099%
tabs06099%
extlink06099%
feedapi_aggregator06099%
subform_element07098%
diff07098%
filter07098%
imap_auth07098%
clone08098%
drush_pm_cvs08098%
node00298%
i18nmenu08098%
xmlsitemap_term00298%
aggregator08098%
find_path08098%
xmlsitemap_user00298%
actions09098%
menutrails09098%
content_taxonomy_options010098%
views_theme_wizard010098%
mimemail010098%
jscalendar010098%
countdown010098%
userpoints_basic010098%
atom010098%
i18nsync010098%
userpoints011097%
tagadelic011097%
email_verify011097%
memcache_admin011097%
recent_changes011097%
email012097%
content_taxonomy_autocomplete013097%
backlinks016096%
drush_sql016096%
fivestar016096%
freelinking016096%
casetracker_views017096%
logintoboggan017096%
content_taxonomy_views017096%
typogrify018095%
flag_content018095%
password_strength019095%
calendar_ical019095%
filter_default019095%
footnotes023094%
send023094%
tableofcontents023094%
i18ntaxonomy023094%
panels024094%
drush_pm025093%
easylink025093%
views026093%
userpoints_views027093%
ed_readmore027093%
webform028092%
wikitools029092%
link032091%
casetracker_basic034091%
nodequeue035090%
views_bookmark037090%
tinymce039089%
asset_panels040089%
auditfiles043088%
casetracker_mail044088%
devel047087%
i18nblocks050086%
cck_blocks050086%
i18nprofile064082%
persistent_login074079%
asset_embed086075%
views_ui086075%
cck_address088075%
og095073%
calendar0111068%
asset_youtube0115067%
asset_bonus0124064%
casetracker0126064%
translation0141059%
devel_node_access0160054%
i18n0167052%
asset0286017%
casetracker_dashboard034300%

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

asset module revamping

I'm glad to announce that the asset modules are getting their share of coding standards attention. The last critical issues are being resolved and I'll be sure to run this module on them before releasing alpha 3.

How up to date

Hello, Thanks for this list. How up to date is it? I plan on using some of the modules on my VB6 site.