The obvious question is why this wasn’t caught and rectified in code review? This seems to be as much a failure due to lack of oversight as opposed to the failure of the person who created the mess.
There are no code reviews when we have to keep churning features quickly and continuously, with always changing requirements in the next meeting with the client.