←back to thread

176 points markx2 | 3 comments | | HN request time: 0.616s | source
Show context
minimaxir ◴[] No.41839979[source]
> Rails, finally some open source! Looks like ~943k lines of code, 143k from Basecamp org. Automattic publishes 6.58M lines of open source code, 6.9x more than you. Yet, we’re “doing open source dirty”?

Wait, did he just use lines of code as a success metric unironically?

replies(3): >>41840106 #>>41840480 #>>41840493 #
nikolay ◴[] No.41840480[source]
Keep in mind that PHP is way more verbose and LOC-hungry than Ruby! So, to compare apples to apples, you need to device the PHP LOCs by at least 2!
replies(1): >>41844541 #
1. Ayesh ◴[] No.41844541[source]
WordPress coding standards is also full of padding. Spaces `like_this( foo, bar )`, curly braces on new lines, etc.

Plus, WordPress bundles all JS and PHP dependencies, including a whole userland PHP polyfill for libsodium.

replies(1): >>41845983 #
2. nikolay ◴[] No.41845983[source]
WordPress is the biggest bowl of spaghetti code in existence! I can't believe it powers 40% of the web! PHP could do tons better - Laravel is a proof that PHP projects could be beautifully coded, readable, and extensible!

I've dealt with WordPress for so many years! It's sickening! Even the overglorified WooCommerce - I won't trust a business with it. I've done only a few sails and I had data loss, and so many issues.

Also, WooCommerce and other popular plugins such as GiveWP abuse the posts system. I've had so many issues causes by patch upgrades, because migrations went bonkers!

Honestly, WP had to be rewritten from scratch 10 years ago. There were some attempts, but they were not supported by Matt. With a rewrite, most plugins and "themes" would have stopped working, but if they are not maintained, they shouldn't be used anyway. I put "themes" in quotes as executable code is not a theme - it's a plugin installed in a different directory!

In general, WordPress is a patch over patches of patches! From mu-plugins (i.e., "must-use") to filters that could hijack the data read from the database - it's nearly impossible to trace which plugins screw up which plugins - even with the help of the overly glorified debugging plugins!

I've participated in a project where the management has decided to migrate a commercial online newspaper from a commercial Python CMS to WordPress - they hired me as I had PHP on my resume and it was hard to find PHP developers in SoCal. Anyway, for over a year, I had to completely remove WordPress from serving customers! Yes, everything was proxied, cached with nginx and optimized ngx_pagespeed (now abandoned). At the time, no commercial WP plugin could keep our website up! For example, an earthquake would take our website down, too, because people would go on our website to check for information and guess what happens if tens of thousands of people want to see the same page when according to the cache it's expired - there was no queue and it would generate 10,000 requests trying to regenerate the same homepage, which was making well over 500 DB calls to render!!!

WordPress hasn't changed much since! Yeah, PHP 7+ is much better, but it is still multi-process. The number of processors is determined by your available memory, and WordPress sometimes uses a lot of memory. That's why the only solution is heavy caching on all tiers!

replies(1): >>41892131 #
3. meiraleal ◴[] No.41892131[source]
> WordPress is the biggest bowl of spaghetti code in existence! I can't believe it powers 40% of the web!

That's not a real statistic. It powers 40% of the long tail of web but not 40% of the access. With Google + Meta included I would guess wordpress doesn't serve even 10% of web.