I'm looking to set up a blog.
There are many "what's the best blogging engine?" questions on SO, but none totally focused on code quality.
I have done a lot of work with WordPress, and it's the #1 solution for many cases, no question. Its extendability and versatility are unmatched. But the code base is a mess, it has a huge memory footprint and extending it often isn't fun. Also, the back-end feels extremely slow on slightly older machines and becomes bearable only with Google Gears IMO. I'm getting less and less comfortable using it.
For that reason, I am looking for recommendations for a PHP-based blogging engine that is
- Simple, slim, and minimalistic in build 
- Has good, structured, clean code, uses PHP5 
- Has blogging basics: Tags, Categories, Comments 
- Doesn't have to look good but needs to output good, semantic HTML / CSS so I can customize 
- Supports some sort of spam control (Captcha and / or Akismet would be nice) 
- I don't care whether it's database or file based 
Optional:
- An API would be nice but is not mandatory 
- Has a plugin system for extensions 
Wet dream:
- Markdown support