Um this goes far beyond "not perfect". It essentially breaks every rule in software design, resulting in a fragile, unmaintainable mess.
Projects written by a single person don't need to be developed as academics say. If u were an owner of an exchange and didn't trust to any other coder u would go the same way.
I do own (well partially) an exchange, and I did initially did code it all myself. I still used concepts like scope delineation, separation of concerns, encapsulation of internal details, test driven development (unit tests), mocking, inversion of control, etc to be used. These aren't just academic ideals, they are used every day in millions of software projects. One programmer or one hundred there are reasons code is broken into logical groupings not one monster horribly do everything superclass. The later produces fragile, unmaintainable, untestable code with the very obvious and expected end result.
I am not gods gift to software engineering but I have written hobbyist projects which had better design.
I think the articles sums it up
To sum up function _Route_getStats($path): XML production, JSON production, file writing, business logic, SQL commands, HTTP header fiddling, hard coded paging limits, multiple exit points...
All these things don't belong in the same class. The http header generator doesn't need to know about the business logic, the SQL connectivity doesn't need to know about the routing. Good software is hard, the capabilities of the computers, and languages already push the limits of what humans can process effectively. Software developers use design tools to help the human manage the code/project. You could write a web application in machine code if you wanted to, ultimately it all ends up there anyways but try spotting a bug in something low level like that. High level languages were developed to allow a better code view.
Personally I am no fan of php for
a variety of reasons but php doesn't mean you have to write code like the leaked gox source. It is possible to write good (or at least better) php. The major issue isn't the choice of language but how that language was (mis)used.