Earlier this year (March 2016), the plugins review team issued a statement on make.wordpress.org that frameworks are no longer allowed in the official plugins repository.
We decided to take it upon ourselves to create a worthy repository for WordPress frameworks and created IncludeWP. A home, or rather, a leaderboard, to display all open-source frameworks for WordPress plugin & theme developers. A one-stop-shop for developers to evaluate what’s currently out there in the market.
It had started as a fun & refreshing weekend side-project that the team had decided to pull together three weeks ago, and the plan was to release it right away. But, during the years I adopted a habit of not releasing anything before getting some feedback on it from people whose opinion I trust, so I decided to poke a few of my friends from the WordPress community first.
We got great feedback and some UI suggestions, but one comment drew most of my attention: Luca Fracassi from Addendio said: “Vova, it would be super-cool if I could click on a framework and see what plugins & themes are actually using it.”
“Hell yeah! That would be amazing.” I thought to myself. But there’s no way that we’re spending our time on manually searching and adding those plugins & themes.
The IncludeWP repository had started as a fun & refreshing weekend side-project for the Freemius team.Tweet
After some back and forth with Luca, we realized that we can leverage the WordPress.org APIs and SVN to automatically identify plugins & themes association with frameworks in WordPress.org. So we decided to join forces.
Luca spent a few days developing a framework identification logic and ran it on .org, and kindly exposed a custom API endpoint for us to consume that data. We leveraged Luca’s endpoint to fetch the plugins & themes data from WordPress.org and presented it under the framework’s page.
It took us another week to finalize it, but now it’s 10x more powerful! Developers can actually see what other products are using the framework. And in the spirit of open-source, it’s available for public use on GitHub.
Why WordPress frameworks, SDKs and libraries are great?
Code reusability is awesome! It’s actually part of the fundamentals of development. As simple as that. Look at WooCommerce, the most popular eCommerce platform online, which started off as a fork of Jigoshop.
As developers, we try to optimize our own code and make sure there’s zero redundancy. But when it comes to other developers’ work, we are suddenly very picky.
Being a developer, I know what you are thinking…
“No one can write code like me.” News flash: there are many gifted developers out there so stop being a snob and start reusing! 🙂
Moreover, some frameworks are used by thousands of developers, deployed on hundreds of thousand of websites, and have been running in production many years. It’s very likely that those libraries are way more bug proof than your newly written code.
“I can build it myself, I don’t need any framework” – Yes you can! But why? Why would you want to reinvent the wheel? I get it; there’s a learning curve when it’s not your code. But on the other hand, learning a framework with solid documentation will certainly be quicker than developing everything on your own, from scratch.
“Why do I need the overhead? I only use a small subset of what the library handles. Hack, the framework is so bloated, it’s larger than my plugin!” – Most plugins start with just a teeny tiny functionality. Maybe today that’s all that you need, but as your WordPress plugin or theme evolves you’ll probably be adding more stuff. Having solid foundations will make your life easier and will save you a lot of time in the future. Try planning for the long run and pick a framework that fits your needs and roadmap best.
Bottom line – stop wasting time on rewriting the same things over and over again. There are like 20 different frameworks that handle custom fields 🙂
Why have we decided to open-source the project?
One of the reasons we started with Freemius for WordPress is because of its awesome community and the open-source mentality. We are firm believers in open-source and it’s power, and that’s one of our ways to give back to the ecosystem.
Secondly, I’m preaching about code reusability. The least I can do is provide the option for other developers to reuse our code for their projects. By reusing this code base, everyone can easily create a similar category type listing mini-site for GitHub repos.
By reusing this code base everyone can easily create a similar category type listing mini-site for GitHub repos.Tweet
A WordPress framework pitfall – Versioning
WordPress is not an operating system, and there are no silos between the different plugins & themes. Also, WordPress core doesn’t have a libraries dependency mechanism in place. This means that if two plugins are using the same framework with different versions, it may trigger backward compatibilities issues, generate errors, and in the worst case – break the site completely.
So take my friendly advice: before you pick your favorite framework, library or SDK, you should make sure it handles versioning.
You should make sure your chosen framework handles versioning.Tweet
How to pick the right frameworks for your plugin or theme
Well, it depends.
If I was starting a new WordPress plugin or theme I would look at the following (not necessarily in this order):
- I would first check what’s out there in the market to understand the different set of features & functionality the frameworks are offering.
- I would definitely examine the popularity of the projects. More popular projects probably have a stronger community behind them, which means it should be easier to get help/advice. It also probably means that the framework’s main bugs were already squashed.
- I would spend more time examining new frameworks. As the web development practices progress. Also, WordPress core is evolving, new frameworks can be more efficient, leverage new core mechanisms – do more with less code.
- I would ask my developer friends from the WordPress community – people that I trust, and can provide me sincere feedback based on their experience.
I have a framework! how can I add it to IncludeWP?
Easy peasy! The website is an open-source project on GitHub, simply fork IncludeWP repo, add your framework as a <name>.php in the src/frameworks folder, and submit a Pull Request.
Make sure to follow some simple guidelines:
- GPL: The framework must be licensed as GPL, so plugins and themes that use it can be listed on WordPress.org (a non-GPL framework renders the plugin non-GPL).
- GitHub: The framework must have a public repository on GitHub that we can link to and pull in stats from.
- Stick to the format: Fill out all the same fields as the other frameworks in src/frameworks.
- WordPress.org (optional): If the framework is already listed as a plugin on WordPress.org, please add a reference to the plugin’s slug.
- Short description: Keep the description for the overview page short & sweet.
So what’s next?
Now it’s your turn to spread the word to the community. Tell to you friends, share it on Twitter, star the project on GitHub… and reuse!
Hey, this is just awesome!
It took me a couple years to realize that some missing things I feel from WordPress or other places are actually my place to create a solution like you have here for authors to find Frameworks. Even if frameworks were allowed in the WPRepo now, it still wouldn’t be an easy, complete one stop shop to find them all. So hopefully we can keep adding frameworks to the site so this can be what it should be for authors, “The Place To Go”.
I made a framework submission/pull request already for my favorite!