CodeTab WordPress Plugin Development Tutorial

Some time back, we released Share on Social, a social media sharing plugin. To share the experience with aspiring plugin developers, this guide explains plugin coding and unit testing to develop a production level plugin.

 
 

There are enough blogs about WordPress Plugin Development. However, it is difficult to find a complete tutorial that explains structure and working of a production ready plugin. In other words, a guide that covers a plugin project from start to end is not easily available. CodeTab WordPress Plugin Development Tutorial is a step by step guide that explains the development of Share on Social Plugin and in the process, it introduces plugin developers to essential WordPress APIs and architecture.

Releasing a WordPress Plugin to public without a good unit test suit in place will eventually make plugin maintenance a tedious task, in terms of bug fixes and frequent releases. Again, it is difficult to get hold of unit tests to study how the leading Plugin Developers are testing their plugins. Many blogs explain the test environment setup and basics, but none attempts to show how it is done at the project level. For new plugin developers, getting the test setup up and running is a frustrating experience. Here, we explain plugin unit test setup in a step by step manner and also, share the entire set of tests we wrote for Share on Social Plugin.

 
 

The source code of complete Share on Social Plugin project with Phpunit and Qunit tests is available for download from GitHub.

The project and guide is updated for Wordpress version 5.7.