Lately I have been adding new and new features to existing application and now came time when I have to play with some seriously old code. I mean - really old, forgotten and never refactored code. It’s just there, it’s working and nobody dares touching it. So before I started I need to prepare myself for the battle.

Bonus: some interesting results of phpmd ran just for two files :) (methods/class names blanked).

...
The class some_class has 41 methods. Consider refactoring user_art to keep number of methods under 10.
The method someMethod() has an NPath complexity of 15211861552761400491758084218783915899329999864762835394560. The configured NPath complexity threshold is 200.
The method someMethod2() has an NPath complexity of 900000. The configured NPath complexity threshold is 200.
The method someMethod3() has an NPath complexity of 119430531454390553552. The configured NPath complexity threshold is 200.
...
The class some_class2 has 3442 lines of code. Current threshold is 1000. Avoid really long classes.
The method someMethod() has an NPath complexity of 151619238808128. The configured NPath complexity threshold is 200.
...

Happy refactoring!