If you take a look at wordpress's internals especially nowadays they aren't that bad
If anything I would say the codebase is not bad and the user interface is amazing. I love it because I know that even the least tech savvy of my clients can figure out its backend user interface so they can make content changes themselves.
Another great thing is especially at this point in its maturity you wouldn't need to alter the wordpress codebase itself at all to get most of the value out of it.
Plugins,whether found or written by you, can take care of whatever you need.