After a long time o creating different custom plugins for our clients, we decided to have a little one submitted to the WordPress repository.

It’s a simple plugin that will allow you to display code inside your content in a simple and stylish way.

You can find more details on the Code Snippet DM page.

Why would you create a free WordPress plugin?

Some of you might wonder why bother creating a plugin and submit it for free in the WordPress repository?

Why not capitalize on it and try to sell it as a premium version?

Well, there are a lot of things to take in consideration, but I will try to cover those that are familiar to me.

1. Try something new

If you work with clients on WordPress projects you will end up doing a lot of work that is custom made. There will be custom plugins, custom themes, and so on. Those plugins will solve a specific problem and maybe you can adjust it so it will serve a larger audience, but there is a change you have some kind of NDA with the client.

By creating a plugin that will be public in a large repository you can test and see if there are people out there that deal with the issue you fixed. You will also be able to collect feedback, support the plugin by fixing the bugs that will be found along the way, but also take on suggestions from people that aren’t part of your team when it comes to future updates.

2. Maybe there is a market for a premium version

Based on the popularity of the plugins and the suggestions you might get from users, you can release a Pro version. Why not?

Premium products should be paid. If your plugin can be taken to the next stage where it will make sense to have a price tag on it, go for it! Don’t forget to keep the free version in the loop and updated because that was the thing that started it all.

3. To put your name on something

It might sound stupid, but when you work with WordPress and use all these plugins from the repository that you think are so cool, you kind of want to have one yourself.

You are not looking necessarily for validation, but you want to give something back to the community. It can be your small project on the side that will bring you joy as you see people using the plugin.


How was this plugin built?

At some point this year I saw this Carbon page where you can generate an image for your code snippet and I liked the look of it.

Starting from that I used prism.js and clipboard.js to put together the plugin.

Similar controls are available to the plugin via a TinyMCE pop-up.

More things will be added in the future.

As of right now, the plugin doesn’t save anything in the database and it’s as simple as possible. It works based on a shortcode that can be added using a TinyMCE button and completing the form in there or by simply pasting it as the documentation shows.

You can also check a demo here.