When performance and code matters
WPBakery Page Builder has been top WordPress product for 3 years and remains a must have tool for any WordPress site online. It was partly possible because of regular improvements which allowed our customers to introduce new features on their websites with each new release. With the years passed and releases booming we saw that WPBakery Page Builder is getting bigger and bigger, so we decided to implement, nowadays, popular practice by making core of the plugin more flexible and remove some unnecessary parts of code which could be replaced by new modern methods and approaches.
Taking all this into account we decided to work on performance issues and code refactoring, resulting in huge improvements starting from version 4.2 which significantly affected performance of WPBakery Page Builder and allowed developers to use “right” methods in the “right” place.
What exactly have we done with performance?
We understand that getting deep into technical description is not the thing you want to see in our blog, this is why we decided to quickly list most important aspects of our refactoring which you can then study closer at our knowledge-base kb.wpbakery.com if you wish. Or you can just start using new version of WPBakery Page Builder and see how performance rate has gone up since previous releases.
One of the most important part was to lower amount of objects loaded as during period we saw increase in things get loaded even they are not used by WPBakery Page Builder in this particular moment. Moreover we worked on correct integration with native WP hooks which allowed us to load things only when they are really necessary for specific operations.
When it comes to refactoring code which can be later used or explored by 3rd party it is important sticking to the standards which we of course took into account by following native WP standards and working a lot on commenting code for other developers to understand.
We have almost completely rebuilt file structure which now allows developers easily find and understand necessary parts of code. Moreover, with single system for element control it is much easier to locate any of the elements.
With the version 4.2. WPBakery Page Builder got rid of unnecessary abstractions which allowed to make things simple and more secure.
In order not to mess the code we separated PHP and HTML code more which resulted in better code usability.
And finally – we could not miss the chance to improve and extend our API which now is more intuitive and powerful than ever before.
Of course there are much more things to do for performance and code and they are already scheduled, but this is a really good start which already shows amazing results.