Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools to detect useless file or useless code PHP

Tags:

php

project

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 ?

like image 735
websitediscount websitediscoun Avatar asked Sep 11 '25 04:09

websitediscount websitediscoun


1 Answers

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.

like image 191
Gabriel Heming Avatar answered Sep 12 '25 17:09

Gabriel Heming