Code coverage and profiling.
Code coverage should be able to tell you what code can theoretically be accessed, right down to telling you if particular branches of if statements are ever accessible (in theory), and profiling will tell you what practically IS accessed.
Profiling will also give you some insight into where the hot spots in the code is. If you know theres a big pile of garbage code, but its very hot, then you might approach with caution, if theres a big pile that only ever gets called once in a very specific way, you might be able to slice it out and replace it with a neat refactoring.
Its all a lot of hard work no matter what you do.
edit: It looks like your doing PHP. What you need is XDebug (an extension for php), WinCachegrind (KCacheGrind is remarkably better if you have access to a linux box) to read its output for profiling, and you'll need to find some sort of decent code coverage tool to use with the output of XDebug.