The WordPress code is commonly known as messy and not the best practice, I’ve found some packages/libraries that can empower WordPress with MVC or at least deacent ORM.
Corcel uses Laravel Eloquent models to manage retrieving content directly from your WordPress database. Once installed you can use the same comfortable syntax you are used to:// All published posts $posts = Post::published()->get(); $posts = Post::status('publish')->get(); // A specific post $post = Post::find(31);
It includes support for posts, post types, taxonomies, pages, categories, and attachments. The one downside is the package is still under development.
WordPlate is a modern WordPress stack which tries to simplify the fuzziness around WordPress development. Using the latest standards from PHP. WordPlate utilizes WordPress as its dependency through Composer.
Themosis – A MVC framework for WordPress developers.
Build custom websites and applications with WordPress.