logoalt Hacker News

9devyesterday at 9:33 AM12 repliesview on HN

The WordPress codebase is a disgrace. PHP is a beautiful language by now, but they absolutely butcher it and refuse to do anything about that.


Replies

CM30yesterday at 10:50 AM

It's just because they don't want to break anything in existing sites, sorta like how Microsoft doesn't generally want to break programs on Windows. So, changes are fairly incremental, and the quality is about what you'd expect from a piece of software that's decades old with no plan for what happens if it got this far.

But what do you do in that situation? If they change the structure too much, then either they make it impossible to upgrade an existing site, or potentially break a whole bunch of things said sites depend on (mostly themes and plugins). And that ease of upgrading is likely what stops a lot of people just migrating away to other solutions.

show 4 replies
bilekasyesterday at 10:22 AM

I'm convinced it's by design so that the community that build little businesses around wordpress still stay in the eco system. A client needs new functionality? That's be a week of work because god help anyone who wants to look into themselves.

WordPress is actively degrading the security and quality of the web I general. Has been for many many years.

bayindirhyesterday at 10:55 AM

The great irony is they still sport their "Code is Poetry" mantra on their website [0].

If code is poetry, Wordpress is a new genre of it, probably?

[0]: https://codex.wordpress.org/WordPress_Philosophy

show 5 replies
evantbyrneyesterday at 11:36 AM

Everything I've used from Automattic has felt that way. If you ever want to torture an engineer, just make them change the layout of WooCommerce checkout.

asimovDevyesterday at 9:53 AM

As a junior I am glad I happened to start working with PHP on version 7. I had some peeks at our legacy PHP5 stuff (all killed now thankfully) and it looked very different. I am sure it would suck to work with.

show 1 reply
geek_atyesterday at 9:34 AM

it would help if they used strict types and modern standards but as you say the wordpress codebase is beyond dated and held together with duckt tape

khalicyesterday at 10:12 AM

I remember multiple projects giving up on rewriting it. Maybe a machine with endless patience could do it?

show 1 reply
pwillia7yesterday at 12:28 PM

tbf literally all my php hate comes directly from WP

mono442yesterday at 10:38 AM

PHP is a proof that you don't need elegant or good technical solutions to be successful. You can literally pile up slop together and still be successful.

show 2 replies
hparadizyesterday at 10:18 AM

It was like that in the old days too. Seriously who makes a postmeta table and goes "yea let's just throw everything in here. Indexes? Meh."

I cringe everytime.

cute_boiyesterday at 2:42 PM

I don't think PHP is a beautiful language. If it was Laravel wouldn't need to rewrite every function from standard library. And, I see no reason to use it compared to Typescript.

show 1 reply
TacticalCoderyesterday at 10:26 AM

> PHP is a beautiful language by now ...

Nope.

show 2 replies