PHPackages                             webdevstudios/oops-wp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webdevstudios/oops-wp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webdevstudios/oops-wp
=====================

A collection of interfaces and class structures to promote object-oriented programming practices in WordPress.

1.0.0(5y ago)5820.7k↓50%7[8 issues](https://github.com/WebDevStudios/oops-wp/issues)1GPL-2.0-or-laterPHPPHP ^7 || ^8

Since Feb 22Pushed 5y ago25 watchersCompare

[ Source](https://github.com/WebDevStudios/oops-wp)[ Packagist](https://packagist.org/packages/webdevstudios/oops-wp)[ RSS](/packages/webdevstudios-oops-wp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (15)Used By (1)

OOPS-WP: Object Oriented Programming Structures for WordPress
=============================================================

[](#oops-wp-object-oriented-programming-structures-for-wordpress)

This library provides a collection of abstract classes, interfaces, and traits to help promote object-oriented development in WordPress.

Installation
------------

[](#installation)

The preferred way to install the latest stable release of OOPS-WP is via Composer. From your project directory, you can run:

```
composer require webdevstudios/oops-wp

```

This will install the library relative to where you called the command, at `/vendor/webdevstudios/oops-wp`. You can navigate to that directory to look through the various classes, interfaces, and traits that are available for you to use. In order to make those structures available to WordPress, you'll need to require the Composer-generated autoload file:

```
if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
	require_once __DIR__ . '/vendor/autoload.php';
}

```

**Note:** Details on why we include the `is_readable()` check is available [in the wiki](https://github.com/WebDevStudios/oops-wp/wiki/Why-wrap-require-autoloader-in-a-is_readable%28%29-check%3F).

### A Caveat

[](#a-caveat)

WordPress isn't designed to be compatible with Composer, and many plugins and themes may wind up using the same libraries. This library is recommended for use in agency-type projects where have full control over the development and installation environment. Including OOPS-WP as part of a packaged release may mean that multiple different copies could wind up getting installed and included in a project, thereby causing unforeseen errors in the system. This is a shortcoming of the way WordPress resolves dependencies, and not one of OOPS-WP. For more information about this issue, [we recommend checking out this great article on by Peter Suhm on WPTavern](https://wptavern.com/a-narrative-of-using-composer-in-a-wordpress-plugin).

Documentation and Development Roadmap
-------------------------------------

[](#documentation-and-development-roadmap)

In its initial release, OOPS-WP contains very few structures to facilitate plugin and theme development. There are a handful of interfaces: `Hookable`, `Runnable`, and `Registerable`, and a few abstract classes, notably `ServiceRegistrar`, `Service`, `EditorBlock`, and `PostType`. These were borne around the need to quickly scaffold some basic structural entities at WebDevStudios, but they are not the only data structures supported by WordPress.

To see what WordPress structures are under development, you can [visit the Issues page of this repo](https://github.com/webdevstudios/oops-wp/issues). For documentation and examples on how to use the structures this package provides, you can [visit the Wiki](https://github.com/webdevstudios/oops-wp/wiki).

Versioning
----------

[](#versioning)

This project follows [semantic versioning](https://semver.org) best practices. What this means is that PATCH releases (e.g., 0.1.1) will include only minor bugfixes or other non-functional updates, such as the text in this README. MINOR releases (e.g., 0.2.0) will include new features, such as additional class structures, and backward-compatible friendly changes. MAJOR releases (e.g., 1.0.0) will contain changes that break backward compatibility. As such, you should be able to safely run `composer update webdevstudios/oops-wp` on packages that are versioned to a major release (e.g., `^1`) without worrying that the updates will break your site. Upgrading to the next major release will mean that you will likely have to make updates to all of the classes that make use of this library to ensure that they're adhering to the latest APIs.

Contributing
------------

[](#contributing)

See the [contributing](CONTRIBUTING.md) doc for information on how to contribute to this project.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 73.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~184 days

Total

5

Last Release

1906d ago

Major Versions

0.3.0 → 1.0.02021-02-27

PHP version history (2 changes)0.1.0PHP ^7

1.0.0PHP ^7 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/1871eb9cf5592f9aef06a1a2b2065ad6e24a0e5ddd7908c835a1f6d8ef4fa56e?d=identicon)[WebDevStudios](/maintainers/WebDevStudios)

![](https://www.gravatar.com/avatar/288e0a96a65ba16682ceb95ef0fa4bba1963760da477b7d266cd839d2d05b1ab?d=identicon)[jmichaelward](/maintainers/jmichaelward)

---

Top Contributors

[![jmichaelward](https://avatars.githubusercontent.com/u/1407326?v=4)](https://github.com/jmichaelward "jmichaelward (22 commits)")[![chrispian](https://avatars.githubusercontent.com/u/2103510?v=4)](https://github.com/chrispian "chrispian (5 commits)")[![salcode](https://avatars.githubusercontent.com/u/5194588?v=4)](https://github.com/salcode "salcode (2 commits)")[![jrfoell](https://avatars.githubusercontent.com/u/630830?v=4)](https://github.com/jrfoell "jrfoell (1 commits)")

### Embed Badge

![Health badge](/badges/webdevstudios-oops-wp/health.svg)

```
[![Health](https://phpackages.com/badges/webdevstudios-oops-wp/health.svg)](https://phpackages.com/packages/webdevstudios-oops-wp)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
