Clean up your mess with PHPMD!
PHPMD is a source code analyser created and founded by Manuel Pichler back in 2009 as a spin-off project aims to be a PHP equivalent of the well known Java tool PMD.
PHPMD check a given PHP source code base and look for several potential problems and common programming flaws within that source using a predefined or custom set of rules.
The PHPMD can help you find several different issues with your code such as possible bugs overcomplicated expressions, unused parameters, methods or properties and bad naming conventions.
The PHPMD can be used as both command line tool which will output reports in different text format such as XML or HTML or as a PHPSTORM built in plugin which will highlight potential problems inside your source code.
The PHPMD analyser is highly recommended if you always strive to minimize your chances of bugs and bad coding practices (we are all human after all).
For more information, documentation and download link you can go over to the PHPMD website @ http://phpmd.org/
For more PHP and Web development pro tips you are more than welcome to follow me and / or the great team over at the Walla! R&D team page
Written by Eldad Fux
Related protips
Have a fresh tip? Share with Coderwall community!
PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.
Security insights from Cside