53

I'm not a fan of PHP or spaghetti code, or anything like that, but in my experience WordPress works amazingly well, it's well organized, and I've never come across any hard to understand code. The documentation is incredibly thorough, any security flaws are fixed within seconds, and it "just works". Not to mention that it does EVERYTHING, and it has an awesome plug-in system. Oh, and "the Loop" is awesome. I've never had any problems doing simple modifications to the code or to themes.

Can you guys give any specific examples of what you don't like about it, or what you would have programmed differently? I just don't understand why it gets such a bad rap. I wish my own software worked as well and had as many features and looked as nice.

6
  • 3
    I've never used it, but I've had to clean up its mess. Thing has an endless stream of vulnerabilities. Wouldn't touch it with a barge pole.
    – bobince
    Sep 26, 2009 at 18:45
  • 16
    What piece of code doesn't have an endless stream of vulnerabilities? Isn't one of the core tenets of programming that anything larger than 'hello world' is going to have a bug?
    – ceejayoz
    Sep 26, 2009 at 18:59
  • 5
    Nonetheless, WP has had far, far more than its fair share, including (from the advisories) very basic escaping problems any competent PHP developer should have avoided.
    – bobince
    Sep 26, 2009 at 22:49
  • 1
    I would maintain that software which is written to do one thing well and not all things possible can often have significantly fewer vulnerabilities. Sep 26, 2009 at 22:54
  • 2
    'the Loop' is awesome?? I almost fell off my chair.. Look, its not awesome. PHP has plenty of loops by itself. You know what's actually awesome? MVC, do it for a while and you'll realize what a mess wordpress really is.
    – YemSalat
    Mar 10, 2015 at 2:41

6 Answers 6

61

I'm a fan of WordPress, but there are definitely issues that impede coders trying to work with it. As a small example, there's get_the_content() (returns) and the_content() (prints), but there's get_permalink() and the_permalink(). Then, there's just the_date(), because it accepts an argument indicating whether you want it to print or return. This kind of thing drives even an experienced WP person up the wall, because you've always got to be Googling the usage - and it speaks to a deeper lack of attention to detail in the code.

Another glaring issue is the lack of built-in caching. It even used to have it, but they ripped it out and never replaced it. You shouldn't need a third-party plugin to have basic caching in a system like WordPress, particularly with all the other bells and whistles it builds in.

To paraphrase (supposedly) Churchill, though, "WordPress is the worst blogging system... except for all the others".

4
  • 6
    I think this is all valid, but I think there is a conscious choice at Wordpress to not duplicate caching when the cache plugin was doing it better. Your argument is kind of like saying "You shouldn't need a third-party word processor. Windows should just come with a full-featured word processor out of the box."
    – Finster
    Sep 8, 2010 at 16:32
  • 12
    @Finster WordPress lacking any sort of cache is like Windows shipping without NotePad or WordPad.
    – ceejayoz
    Sep 8, 2010 at 17:20
  • 3
    @Finster - I had the opportunity to chat with Matt Mullenweg a few years ago: he specifically stated he was against caching because of synchronization problems. Instead, he recommended throwing additional application servers and slave (read-only) MySQL servers at the problem.
    – BryanH
    Dec 4, 2012 at 19:46
  • 1
    ...because slave MySQL servers never have synchronization issues..
    – robertmain
    Apr 29, 2018 at 3:52
16

I've written many custom applications in PHP/MySQL over the years - from tiny to huge. Not having taken the time to learn the details of WordPress, I find it very frustrating to work with (under the hood).

Subjectively:

  • Very poor naming conventions
  • Execution flow is bizarre
  • General lack of organization
  • Hard to audit what happens when
  • etc...

Their concepts of usability is great, and support for plugins is also great. I'd just love to see the system re-engineered with those principles, but with a disciplined and clear development methodology.

I'm sure the next guy would say "no it isn't, bla bla bla", but that is just my opinion after bumping into it (hosting, modifying) about 3 times.

1
  • 2
    Sorry for reviving very old conversation, but the issues are still there. The thing that really makes me angry when developing a software for Wordpress is the global state. Today's application's code is intentionally divided into many separated parts to sustain maintainability of the code. Wordpress does no such thing. Besides very poor class autoloading, it shares global state over all of the application and it gets really messy. I am really trying to give an objective opinion, but as a backend developer, this is just example of very badly written code.
    – Maki Vlach
    May 12, 2018 at 18:48
11

It's a subjective question for sure. From experience I've notice WP takes way, way more server resources than other systems or my custom code. I've had to move WP sites off my servers as a consequence. So my experience suggests there are some memory use issues.

As an exercise try going through the code, tracing the logic from the start of a request to a page, and look at how many objects are loaded, how many methods are called before any HTML is output.

3
  • @devin-ceartas : > tracing the logic from the start of a request to a page How we can do it in a code ?
    – justjoe
    Mar 17, 2010 at 7:28
  • 1
    i thought you on making some debugging function or pluggin ;D
    – justjoe
    Mar 18, 2010 at 3:17
  • 6
    "From experience I've notice WP takes way, way more server resources than other systems" - might be true from your experience until you work with magento...
    – Gaia
    May 6, 2010 at 20:44
8

Apart from what's been mentioned already:

No sane templating system. All those years and they still have PHP code intertwined with HTML, and default templates that have no support for i18n or l10n whatsoever (hard-coded strings, hard-coded date formats, etc.).

Multiple entry points - maybe it's just me, but it's annoying. Especially when some of those are way too big.

6
  • 1
    No i18n? Blatantly false, it's built in. codex.wordpress.org/I18n_for_WordPress_Developers $hello = __("Hello, dear user!"); Same thing for date formats - codex.wordpress.org/Function_Reference/date_i18n
    – ceejayoz
    Sep 26, 2009 at 18:56
  • A snippet from newest version, wp_content/themes/default/single.php: codepad.org/yU2Kaoe6 Sep 26, 2009 at 18:59
  • 2
    Nothing prevents you from using the l18n functions in theme templates. The theme I coauthored certainly does. tarski.googlecode.com/svn/translations/trunk
    – ceejayoz
    Sep 26, 2009 at 20:14
  • I know that nothing prevents me. But the default template doesn't have that. And given that it's ugly (IMHO, of course; I'm templating zealot ;)) PHP-with-HTML, then I'd like to be able to use default and have i18n at the same time. I can't, and that's what I was referring to, not to the lack of i18n capabilities in the core. Sep 26, 2009 at 20:20
  • OK, so by "not in templates", you meant "it's not implemented in some specific templates". That's a rather significant difference.
    – ceejayoz
    Sep 26, 2009 at 20:22
4

When you have to be sure of a statement that is made by "everyone", if you can, is trying to check it for yourself.

And you can do something in your statement: just read Wordpress source code. Some modules are good, some are a mess, some others are just normal. But all of them compose a great blog system that are used by thousand of people around the world that are more interested in writing good stuff instead of complaining about "how ugly" is a particular source code. In summary, the Wordpress creators have a shippable product that is useful.

In the end, it doesn't matter. If you want a perfect blog system, you can always write one yourself.

1
  • 1
    Well, again, I would like to understand the negative vote so I could improve os just delete my answer? Did the voter at least tried to read the OFFICIAL wordpress link I gave core.trac.wordpress.org/browser/tags/2.8.4/wp-admin/includes/…, and check why I considered a mess (it's even written in the official module itself)?
    – GmonC
    Sep 29, 2009 at 21:33
4

Can you guys give any specific examples of what you don't like about it, or what you would have programmed differently?

I would have added more comments.

On a separate note, the most recent version of Wordpress introduced a labyrinthine piece of code that denies access to pages that: 1. Aren't in a menu or submenu 2. Aren't in the $_registered_pages variable.

A lot of plugins for earlier versions of Wordpress have been broken by this new security measure.

Finally, sessions. Wordpress does its very best to get out of your way by handling all its session data in a separate manner from PHP's built-in $_SESSION variable, but it doesn't give you the option of starting the PHP session, you have to add that to the core program yourself. I haven't found documentation that would allow us WP hackers and plugin writers to take advantage of the pre-existing WP session yet, either.

Not the answer you're looking for? Browse other questions tagged or ask your own question.