While not free, Paul M Jones book Modernizing Legacy Applications in PHP has really helped me get control of a large old codebase.
It gives examples and goes bit by bit through the process of organizing code.
I'm using its suggestions along with a static checker called Phan, which I chose because it attempts to "prove incorrectness rather than correctness."