I haven't looked at wordpress code in a really long time, but 5 or so years ago I had to hack up a wordpress install for a client. There was one giant monolithic method that created a string for the sql query to get the posts for pretty much every imaginable part of a wordpress site that is an index of posts. there was a combinatorial explosion of options you could pass this monolith and it was nearly impossible as someone who didn't write it to figure out how to make it do something really simple like add paging to the RSS url.
There is no reason any code in any language should have this sort of problem. It isn't merely cruft from a long legacy of existence.
Wordpress codebase sucks by all accounts, I'm just wondering if this is related to PHP or we'd see something like this in every non-framework code, regardless of language.
(Rails/Django might be a different case, due to the benefits of having an MVC framework as base. But these exist in PHP as well)