This is the project site of PHPMD. It is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
What PHPMD does is, it takes a given source code and analyzes it for several potential problems. These problems can be suboptimal code, over complicated expressions or dead code, like unused parameters, methods and properties.