I've worked mainly on Wordpress themes and plugins for the last 7-8 years, and I've yet to see anything resembling common best practices regarding testing, CI/CD or even deployment coming from Automattic, especially regarding themes. That would be very nice to have.
Most of the issues regarding the instability and lack of security of the platform come straight from the mantra "upload the file using ftp and the edit them straight on production server" advertised by Automattic. This is not a serious answer from a platform that allegedly controls roughly 30-40% of the websites around.
What I'm afraid is that most of those choices (not moving to current development and deployment standards, doing the bare minimum in terms of upgrades to core functionalities of the platform, forcefully intertwining data, content and appearance of the website in the same SQL tables) are well intentional, and Automattic is "pulling an Internet Explorer 6", making sure that most users are locked-in on their platform by staying very away from any modern tech that could somehow make easier for developers to move to a different platform.
It's very, very complicated to move anything written on Wordpress on a different platform without losing some content along the way .
When your website is actually just a huge ball of: pictures loosely related to your content by their dynamically generated file name, textual content placed inside layout-defining shortcodes all stored together inside a single SQL query and dinamically rewritten by some inline php written in a single functions.php file, forget about moving anything to Squarespace, Ghost, Hugo or whatever without having to actually rewrite by hand all of your posts.
Oh, and also - I'd love to see some actual moderation in the Plugin marketplace. It's become incredibly common to find a plugin being acquired by another developer and being completely replaced between versions with a completely different plugin having just a very passing resemblance with the original set of features but also integrating a slew of unrelated paid "marketing" services and subscriptions.
Just today I found out a "maintenance page" plugin has just morphed into a full visual builder who immediately started nagging about having a subscription for the inevitable "pro version".