Tools to detect useless file or useless code PHP

时光总嘲笑我的痴心妄想 提交于 2019-12-23 19:23:06

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/41481404/tools-to-detect-useless-file-or-useless-code-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!