Epilogue: WordPress

I mentioned the flies, but there is much, much more than could be said about the downside. The balance of the last year or so of working with WP:

Spaghettified Code is Poetry Spaghettified

Show a programmer some of the WordPress code as a deterrent. They should swear off further coding with immediate effect. Just take a look at this nonsense, replete with single spaces to position the lines (not heard of the tab key?) and those endearing, but useless, trailing space-slashes at the end of the tags:

    <homePageLink><?php bloginfo_rss(’url') ?></homePageLink>
    <apis>
      <api name=“WordPress” blogID=“1” preferred=“true” apiLink="<?php echo site_url(’xmlrpc.php', ’rpc') ?>" />
      <api name=“Movable Type” blogID=“1” preferred=“false” apiLink="<?php echo site_url(’xmlrpc.php', ’rpc') ?>" />
      <api name=“MetaWeblog” blogID=“1” preferred=“false” apiLink="<?php echo site_url(’xmlrpc.php', ’rpc') ?>" />
      <api name=“Blogger” blogID=“1” preferred=“false” apiLink="<?php echo site_url(’xmlrpc.php', ’rpc') ?>" />
      <?php do_action( ’xmlrpc_rsd_apis' ); ?>
    </apis>

This is like teaching someone to breathe by giving them the following instructions:

  1. Open the window;
  2. Breathe in;
  3. Close the window;
  4. Breathe out;
  5. Repeat as desired.

And this is no exception. I have seem whole logical blocks interrupted by these unnecessary calls to open PHP and close it again. One example:

  <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
    <h2><?php _e(’Activation Key Required') ?></h2>
    <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">

Where on earth does this block end? OPEN IT ONCE and LEAVE THE BLOODY THING OPEN! Nothing is more distracting to understanding code than trying to put it into a coherent form to begin with.

And then there are all the function aliases (completely unnecessary – give the thing a name and make sure everyone uses that name), empty functions (“stubs”), and a jungle of required files to muddy the waters further. Try tracing back where some particular value is being operated on and you’re in the labyrinths of DOOM within a couple of minutes and no way to extract yourself.

Metric incontinence

For real thrills at Halloween open up the 2010 stylesheet:

ol {
  list-style: decimal;
  margin: 0 0 18px 1.5em;
}

What??? One margin in pixels and the other in ems? Not to mention the percentages and point values that abound. Sounds to me like doing whatever you can to make the theme look nice on the boss’s computer, and guaranteed nobody else’s device. I’ve got a tip for the guys at WordPress: Why not just graphicalise everything? Then everything will always be in the same place, regardless of what device you’re trying to view it on. Not that that would make it any more readable, because for about half of the screens our graphic will only take up a fraction of the screen, and for the other half the user will have to scroll across large areas of graphic to get to the content they want.

There is a reason why browsers, html and everything else on the net should be flexible. Live with it.

Security? What security?

My last post on sploggers really hammered the woodwork, and crawling out they came. Honestly, WP could supply some basic security right from the get-go, such as checking to see whether forms have been sent from the hosting server before processing them, that could save some of the technical brute force solutions found in diverse forums.

There is one tried and true way of taking the wind out of the sails of the registration spammers: Confirmation. Since these spammers never use a real email account, sending a confirmation code to that email will never arrive, and they will never be able to confirm their account. Then simply delete any accounts that are unconfirmed for a period of, say, three days. No need to inform the blog admin that someone has signed up to the account until the account has been confirmed. And in this way it becomes unattractive to the sploggers because they can annoy nobody, they are completely ignored as they should be, and they will be left to die in ignomy.

A word of advice

If I were WordPress, I’d start with a clean sheet. There has to be a reason why people should want to work with your product. It should have some advantage, some convenience, something that it can do, but I can’t. At the moment that something exhausts itself in being able to schedule posts to appear at certain times, when I can’t be at the computer. That’s not enough. The next blog – crowd sourcing/citizen science – will be done on a neutral platform. I tried, and I tried hard, but this just doesn’t cut the mustard.

Leave a Reply

Your email address will not be published. Required fields are marked *