The WordPress Codebase

By Deane Barker on June 6, 2005

You Don’t Have To Be Pretty To Be Successful: Joseph Scott has some commentary and a lot of good links on the state of the WordPress codebase.

There are lots of good things about WP. It is fairly easy to install and from the user point of view it looks nice for the most part. But if you take a peak under the hood at the PHP code that makes WP happen, you’ll likely be very disappointed.

I share some of the concern here. There’s no good templating language, although they at least moved away from the hideous idea of “let’s stick everything in index.php.”

I posted to the WP forum a few weeks ago about an API that would let you go around the presentation deficiencies. According to the responses, there is apparently no such API. I played around with it for about 30 minutes, and had a good one going. Something like:

$wp = new WordPress();
$posts = $wp->GetPosts('date', 'ASC', 10);
foreach($posts as $post)
   //Do something

It worked really well, and I may go back to it. The idea was that if you did this, then you could just push everything off to Smarty for presentation.

But, in the end, I share Joseph’s optimism for the project. As I wrote two years ago, projects rarely sink or swim on the perfection of the code. Successful apps (1) solve a problem, and (2) are pleasant experiences for the user. WordPress suceeds on both levels.



  1. Jonathan, we are in fact doing something similar to what Deane is suggesting. We wrote a new front-end for the WP database from scratch, encapsulating methods into a separate class, using proper templates (simpler than Smarty), and moving non-core functionality to plugins.

    Everybody is welcome to contribute to LightPress ofc, developers and documentation writers are both welcome (oh, and users too) :)

Comments are closed. If you have something you really want to say, email and we‘ll get it added for you.