Search code examples
phpproject

Tools to detect useless file or useless code PHP


I have a very big PHP project with i think a lot of useless stuffs .

Do you have some tips or maybe some tools to detect useless part of code or useless files ?


Solution

  • PHP Mess Detector (PHPMD):

    • Possible bugs;
    • Suboptimal code;
    • Overcomplicated expressions;
    • Unused parameters, methods, properties.

    PHPMD will show to you all mess created in your code. It's also show the cyclomatic complexity of your codem which will let you do a few code optimizations.

    PHP Depend

    PHPMD is a spin-off of PHP Depend. PHP Depend will show to you better metrics and graphics of your software than PHPMD. A really powerfull tool, better than PHPMD for optimization, but with a different purpose.

    Mark Baker also talked about PHP Dead Code Detector (PHPDCD). IDK the project, but seems very similar to PHPMD.