PHPackages                             sherv/wp-plugin-foundation - 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. [Framework](/categories/framework)
4. /
5. sherv/wp-plugin-foundation

ActiveLibrary[Framework](/categories/framework)

sherv/wp-plugin-foundation
==========================

A structured foundation for building maintainable WordPress plugins using modern PHP practices, service providers, a DI container, and lifecycle management.

v1.0.0(3mo ago)00[1 PRs](https://github.com/shervElmi/wp-plugin-foundation/pulls)MITPHPPHP &gt;=8.2CI passing

Since Apr 1Pushed 3w agoCompare

[ Source](https://github.com/shervElmi/wp-plugin-foundation)[ Packagist](https://packagist.org/packages/sherv/wp-plugin-foundation)[ Docs](https://github.com/shervElmi/wp-plugin-foundation)[ RSS](/packages/sherv-wp-plugin-foundation/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (7)Versions (5)Used By (0)

WP Plugin Foundation
====================

[](#wp-plugin-foundation)

A foundation package for building structured, maintainable WordPress plugins using modern PHP practices.

[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/f2a8ce481f9787833e7d3330d6cdf3f1494f984301cbeaf6bc14fcfc34efc316/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e322d626c7565)](https://www.php.net/)

Requirements
------------

[](#requirements)

- PHP 8.2+
- Composer
- WordPress

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

[](#installation)

```
composer require sherv/wp-plugin-foundation
```

Quick Start
-----------

[](#quick-start)

```
use Sherv\Foundation\Plugin;

$plugin = Plugin::new( __FILE__ )
    ->with_plugin_properties()
    ->with_providers()
    ->build();

register_activation_hook( __FILE__, [ $plugin, 'on_plugin_activation' ] );
register_deactivation_hook( __FILE__, [ $plugin, 'on_plugin_deactivation' ] );

add_action( 'plugins_loaded', [ $plugin, 'boot' ] );
```

Documentation
-------------

[](#documentation)

1. **[Introduction](./docs/01-introduction.md)**: Overview, features, and quick start.
2. **[Getting Started](./docs/02-getting-started.md)**: Step-by-step setup for a new plugin.
3. **[Architecture](./docs/03-architecture.md)**: Components overview and UML diagram.
4. **[Plugin Builder](./docs/04-plugin-builder.md)**: Builder API, paths, and plugin properties.
5. **[Service Providers](./docs/05-service-providers.md)**: Creating, registering, and booting providers.
6. **[Plugin Lifecycle](./docs/06-plugin-lifecycle.md)**: Activation, deactivation, and boot process.
7. **[Container](./docs/07-container.md)**: Accessing the DI container and resolving services.
8. **[Requirements Validation](./docs/08-requirements-validation.md)**: Pre-boot environment checks.
9. **[Exceptions](./docs/09-exceptions.md)**: Error handling reference.

Development
-----------

[](#development)

```
git clone https://github.com/shervElmi/wp-plugin-foundation.git
cd wp-plugin-foundation
composer install
```

### Scripts

[](#scripts)

CommandDescription`composer test`Run the test suite`composer test:coverage`Run tests with code coverage`composer lint`Run PHP CodeSniffer`composer format`Auto-fix coding standards violationsContributing
------------

[](#contributing)

Contributions are welcome. Please open an issue or pull request on [GitHub](https://github.com/shervElmi/wp-plugin-foundation).

Security
--------

[](#security)

To report a security vulnerability, please see [SECURITY.md](SECURITY.md).

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for a history of notable changes.

License
-------

[](#license)

© Sherv Elmi. Licensed under the [MIT License](LICENSE). Distributed without any warranty. See the license for details.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% 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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61981da817994edacc5545ad8c6a507b88365f1d86f42b56faacc1af1e590b9c?d=identicon)[ShervElmi](/maintainers/ShervElmi)

---

Top Contributors

[![shervElmi](https://avatars.githubusercontent.com/u/69119241?v=4)](https://github.com/shervElmi "shervElmi (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")

---

Tags

pluginwordpressservice providerfoundationlifecycle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sherv-wp-plugin-foundation/health.svg)

```
[![Health](https://phpackages.com/badges/sherv-wp-plugin-foundation/health.svg)](https://phpackages.com/packages/sherv-wp-plugin-foundation)
```

###  Alternatives

[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

273.9k1](/packages/alleyinteractive-pest-plugin-wordpress)

PHPackages © 2026

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