Skip to content

kurtpayne/wordpress-plugin-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

** THIS IS A WORK IN PROGRESS, NOT READY YET, but feel free to poke **

Place the WordPress folder in your CodeSniffer/Standards folder.

This requires PHP CodeSniffer:
http://pear.php.net/package/PHP_CodeSniffer/

And ant
http://ant.apache.org/bindownload.cgi

And RIPS
http://sourceforge.net/projects/rips-scanner/

# Check out a local copy of wordpress-plugin-anazlyer
cd ~
git clone https://github.com/kurtpayne/wordpress-plugin-analzyer.git

# Install to CodeSniffer
ln -s wordpress-plugin-analyzer/CodeSniffer/WordPress /usr/lib/php/pear/PHP/CodeSniffer/Standards/WordPress

# Run with ant
mkdir -p /tmp/plugin
cp myplugin.zip /tmp/plugin.zip
ant -Dbuild_src=/tmp/plugin -buildfile ant/build.xml -Drips=/path/to/rips/ -Drun_cpd=true -Drun_jslint=true -Drun_docs=true -Drun_phplint=true -Drun_pmd=true -Drun_rips=true -Drun_syntax=true -Drun_readme_validator=true -Drun_pci=true -Drun_csslint=true

# Now look around in /tmp/plugin/logs
cd /tmp/plugin/logs


THANKS:
 * Original WordPress CodeSniffer standards by John
 * http://urbangiraffe.com/articles/wordpress-codesniffer-standard/
 * RIPS - http://www.php-security.org/
 * CodeSniffer - http://pear.php.net/package/PHP_CodeSniffer/redirected
 * Google Closure - http://code.google.com/p/closure-linter/
 * PHP - http://php.net/
 * WordPress - http://wordpress.org/
 * PHP CPD - https://github.com/sebastianbergmann/phpcpd
 * PHP PMD - http://phpmd.org/documentation/index.html
 * PHP CompatInfo - http://pear.php.net/package/PHP_CompatInfo/
 * CSS Lint - http://csslint.net/
 

TODO:

 [X] Submit readme.txt (if found) to http://wordpress.org/extend/plugins/about/validator/

 [X] Validate phpdoc rules (probaby doclbox for performance)
 
 [X] Validate with gjslint
 
 [ ] Web front-end

 [X] Validate with csslint https://github.com/stubbornella/csslint/wiki/Command-line-interface

 [X] Run through RIPS scanner

 [X] Run through phpmd

 [X] Run through php compat info

 [X] Run through php -l
 
 [X] Turn into an ant project
 
 [X] Run through php copy paste detector

About

Static analysis tools for WordPress plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages