StellarWP Releases Open-Source Libraries for Advanced WordPress Development

Learn how the StellarWP engineering team is sharing code and working to raise the bar for development in WordPress.

A thriving community has always been one of WordPress’s greatest assets. But in such a large ecosystem, it can be easy to slink into our silos, whether we’re working at software companies or as freelancers.

One antidote to isolation is sharing code beyond the walls of an organization. That’s one reason StellarWP recently started publishing our most versatile libraries and tools.

Matt Batchelder, StellarWP director of engineering & infrastructure, and Jason Adams, GiveWP manager of development, walk through the tools we’ve published recently and why sharing matters—both within StellarWP and the broader WordPress community.

What we’ve published

So far, the StellarWP engineering team has shared three major projects.

  • stellarwp/db: This library wraps around the WordPress database class to provide a modern, object-oriented interface. It also catches database errors that WordPress otherwise doesn’t. Code largely comes from GiveWP, where the library has been thoroughly tested. Internally, we’ve adopted this library to power licensing for many of our StellarWP brands.
  • stellarwp/schema: Largely lifted from The Events Calendar team, this library provides a super approachable API for working with custom table definition.
  • stellarwp/slic: Built by The Events Calendar team, this tool allows for consistent execution of automated tests on local and continuous integration environments.

This is just the beginning. We have more projects in the works!

Why we share our code

As StellarWP has grown to include dozens of WordPress plugins and add-ons, we’ve found ways to share best practices among our teams across disciplines.

In the process, we also spotted an opportunity to share our most flexible code with the rest of the WordPress community.

“Other teams and devs are most definitely trying to solve similar problems,” Matt says. “We can look at the various solutions being built within StellarWP and pick the most flexible code to build from, then cherry-pick smart implementations from multiple sources to make a better solution that we share beyond the walls of our organization.”

Raising the bar for engineering in WordPress

On top of sharing code that’s already battle-tested by our largest brands, we’re building automated testing into these resources to ensure libraries continue to function seamlessly for everyone who relies on them.

This extra work takes time, but a “measure-twice, cut-once” approach enables us to create libraries, tools, and products that are structurally sound.

“In software architecture, a smart thing to do is take pieces of your code and break it down into a small, testable piece of work, and you test it and test it and test it,” Jason says. “We have more confidence because things have been tested so much in isolation.”

Ultimately, we hope to lead by example—and push the development standards in WordPress to a higher level that’s on pace with the rest of the industry.

“We’re providing documentation and recommended approaches for using those libraries,” Jason says. “When someone wants to build a library or a plugin for WordPress, they can look to StellarWP for how to do that in a modern way.”

Baking it into the workflow

Sharing a library isn’t as simple as dropping the code into GitHub and moving on. The process requires careful auditing of code that already exists. It also adds extra steps as our teams develop new features.

“Any new feature we’re coming up with, we’re saying, ‘Okay, is there a piece of this that’s extractable and might be useful across StellarWP or externally?’ ” Matt says.

For now, the work is happening organically as time and resources allow. And while developers beyond StellarWP stand to benefit from the libraries, sharing also creates a platform for StellarWP team members to showcase their work.

“Our team has put blood sweat and tears into this work that’s been proprietary for so long, and now it’s available so that other people can benefit and also see the good work our team is doing,” Matt says. “That’s exciting to team members, and that makes me happy.”

You might
also like

Similar Posts