The SensioLabs Insight tool was used to evaluate technical debt within various projects, and they evaluated and published the responses. SensioLabs responded on their blog saying that the results didn't account for project age or project size, but nevertheless it does show the technical debt you're up against in using some frameworks as foundations:
Don't get me wrong: WordPress is a great CMS; yes, it has some quirks in the core and comes from the days before OOP, but it's a great blogging platform. You ordinarily shouldn't be fiddling with it's core code, so you don't need to worry about it. By no means should you write your own blogging platform or CMS, but at the same time, WordPress isn't the right problem for building a marketing asset system or an insurance quote generator (yes, both are real projects I have been asked to do in WordPress initially).
In short: use the best foundations for your task.