You can always add code snippets to your theme’s functions PHP file or create a plugin, but recently plugins to manage code snippets have become popular. I used the free Code Snippets plugin for years, but in this review I’m looking at the WPCodeBox plugins. I was recently given a copy to try and wanted to share a walk-through and evaluation of it. This is a new offering that has some features not found in other offerings.
The video version has the full walk-through. The written version is a summary of what is covered in the video.
Website and Pricing
WPCodeBox is a premium only offering. There is no free version in the WordPress plugin directory.
The plugin is available for purchase for 1, 5, or unlimited sites. All of the packages come with lifetime updates and support. One of the features of WPCodeBox is the ability to save code snippets to the cloud. We will look at that feature shortly, but note that the single site package has a limit on the number of snippets that can be saved to the cloud. A note on the website says that the lifetime option will be discontinued after the initial launch period.
There is some documentation on the site and an email form for support.
WPCodeBox Admin UI
When you activate WPCodeBox you get a new admin menu and a user interface for creating and managing snippets.
On the main panel there are 5 links. The Settings link is where you enter your API key. This key is available in your account area on the WPCodeBox website. The API key connects your site to the cloud.
Next to the Repository button is the New Snippet button. Next to the New Snippet button is the new folder button. Under the top row of buttons is a search box and under that a link to Cloud Snippets. This is where you upload and download snippets from the cloud so that you can build up your own library of snippets to conveniently use on multiple sites.
Tour of Snippet Editor Interface
- The snippet name
- Collapse the sidebar to make more room in the editor
- Enable / disable the running of the snippet
- Code template generator (see below)
- Title input
- Description, useful when saving to the cloud
- The rules for where and when to run the snippet
- The code editor
When you have a snippet open in the editor there is a button to save it to the cloud. Once you save it to the cloud then you can download it on other sites where you have WPCodeBox installed.
WPCodeBox has a feature where you can enter some information and it will generate a code template to get you started. So far, the Shortcode generator is available. The first version is somewhat limited as there are features of shortcodes, for instance, which it doesn’t offer to create for you.
Note about SCSS and LESS Snippets
WPCodeBox supports SCSS and LESS code. Compilers are included and the compilers are run when the snippet is saved, not each time the code is used, so that is a good feature.
Summary And Conclusions
In my walk-through of WPCodeBox I noticed a few things that I could suggest for improvements:
None of those items above are bugs. They are just suggestions.
There were a number of things that I saw that I liked, including:
Overall WPCodeBox is a nice plugin that offers many convenience features.