One of the project that I had to work on recently was huge and written over by developers who were working intermittently on it with very short deadlines. Hence the code had duplicate code, dead functions which were never used. It needed re-factoring badly.
I found the below tool which helped us a lot in identifying duplicate and dead code.
for identifying and detecting duplicate code. (php copy paste detector)
for identifying and detecting dead code. (php dead code detector)