Blog Post

Rating plugin Namespace project

GD Rating System Pro was first released in 2015. Since then, the plugin codebase has grown significantly, and it includes a number of addon plugins. And, this year, this plugin and all its addons will get a full code remake to take advantage of the modernized PHP code.

In the past two years, many Dev4Press plugins have undergone the process of updating the code base to modern PHP code based on namespaces, using more PHP 7 features to improve the performance of the code. For some plugins, this process takes a lot of time, due to the extensive plugin size, and it is done in stages. GD Rating System and its addon, are one of the largest plugins Dev4Press has, so it will also need to be done in stages. Plugin version 4.6 scheduled for next week, will be the first version of the plugin starting this rewrite process.

The first stage of the process is converting part of the plugin codebase into a namespace-based organization. To minimize the issues with the change, the plugin will use a class alias function to convert new classes into old class names. This will be a stop-gap measure to ensure that everything works as before, without committing to a full rewrite of everything. The plugin system requirements will be in line with the latest changes announced last month: the plugin will require PHP 7.2 or newer going forward.

Another part of the changes will be embracing the Block Editor blocks. The plugin will get blocks to replace shortcodes and widgets, and the process of doing that will be done during this year. That also means that in the next major release (4.7), the plugin will get a new addon where the shortcodes and widgets will be moved, and the plugin will get blocks support instead. Exact plans for that are still in the works.

During this year, I expect 2 more major releases to continue with the process of rewriting the codebase. The process will include changes to some of the core logic related to expanding the plugin feature, moving to the latest Dev4Press Shared Code Library and finishing the codebase conversion. I am not sure if version 5.0 will be ready by the end of this year, but that is the goal. If not ready by the year’s end, it will be out in the first half of the next year.

If you have any suggestions about the process or some new plugin features, please, use the support forums to let me know.

Please wait...

About the author

Milan Petrovic
Milan Petrovic

Programmer since the age of 12 and WordPress developer since 2008 as freelancer and author of more than 200 plugins and more than 20 themes.

The Newsletter

Leave a Comment

SiteGround - Cloud Hosting: Fast, Scalable, Fully Managed
GeneratePress - The perfect lightweight theme for your next project