Tried PHP Mess Detector on WordPress

So first I had to install PDepend, PHPMD depends on it.

sudo pear channel-discover pear.pdepend.org
sudo pear install pdepend/PHP_Depend

pear channel-discover pear.phpmd.org
sudo pear install phpmd/PHP_PMD

Help text for PHPMD:

Mandatory arguments:
1) A php source code filename or directory. Can be a comma-separated string
2) A report format
3) A ruleset filename or a comma-separated string of rulesetfilenames

Available formats: xml, text, html.
Available rulesets: cleancode, codesize, controversial, design, naming, unusedcode.

Optional arguments that may be put after the mandatory arguments:
--minimumpriority: rule priority threshold; rules with lower priority than this will not be used
--reportfile: send report output to a file; default to STDOUT
--suffixes: comma-separated string of valid source code filename extensions
--exclude: comma-separated string of patterns that are used to ignore directories
--strict: also report those nodes with a @SuppressWarnings annotation

Running phpmd:

mike@mike:~/Sites/wordpress-svn$ time phpmd . text codesize,unusedcode > phpmd.log

real    29m3.751s
user    28m30.463s
sys     0m12.998s

Output is available at http://pastebin.com/BST2evre

Advertisements

About Michal Zuber

Biker and rollerblader. Owner and developer at http://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/
This entry was posted in cli, php, wordpress and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s