I've seen so much bad code in my life... even in enterprise systems... this one looks quite average

I agree. I've worked as a software developer for 15+ years and this really is not that bad compared to some of the code out there. I was honestly expecting worse..
The code is not particularly readable, therefore it probably has some subtle bugs. OO PHP is some of the worst looking code out there, but it
mostly works... Honestly, what else is anyone suggesting people USE to make this type of site?
Surely NOT Ruby (way more scary than PHP), and probably not C++/CGI (too esoteric and crashworthy), probably not Python/web (still not ready for the bigtime), and don't even mention Java (the world will be a better place when people finally stop using it).