This is an excellent point, but it should be noted that once you delete the unused API endpoint, finding the rest of the dead code is almost trivial with static analysis.
30-15 to static analysis, I think? ;)
30-15 to static analysis, I think? ;)
It doesn't help with potentially reachable but unused cpdepaths, which in my experience make up for the most of 'dead' code.
Think of the functionality in an application that nobody uses or of obsolete API version when all the clients use a more recent version.