PHPackages                             amostajo/wordpress-plugin-core - 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. amostajo/wordpress-plugin-core

ActiveLibrary[Framework](/categories/framework)

amostajo/wordpress-plugin-core
==============================

Core functionality and libraries for Wordpress Plugin (a light weight plugin template with composer and MVC).

v1.0.8(8y ago)181663MITPHPPHP &gt;=5.3.0

Since Jul 20Pushed 8y agoCompare

[ Source](https://github.com/amostajo/wordpress-plugin-core)[ Packagist](https://packagist.org/packages/amostajo/wordpress-plugin-core)[ RSS](/packages/amostajo-wordpress-plugin-core/feed)WikiDiscussions v1.0 Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (11)Used By (3)

WORDPRESS PLUGIN CORE (For [Wordpress Plugin](https://github.com/amostajo/wordpress-plugin))
--------------------------------------------------------------------------------------------

[](#wordpress-plugin-core-for-wordpress-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/af44f619623e058c13ab30f16909a3a1dfd0ba5406607fc0978094020f6b1889/68747470733a2f2f706f7365722e707567782e6f72672f616d6f7374616a6f2f776f726470726573732d706c7567696e2d636f72652f762f737461626c65)](https://packagist.org/packages/amostajo/wordpress-plugin-core)[![Total Downloads](https://camo.githubusercontent.com/aa1b08f08cd32cfc85ba812122bbd2a98ed68e203d50c15813120d7ae079e8f5/68747470733a2f2f706f7365722e707567782e6f72672f616d6f7374616a6f2f776f726470726573732d706c7567696e2d636f72652f646f776e6c6f616473)](https://packagist.org/packages/amostajo/wordpress-plugin-core)[![License](https://camo.githubusercontent.com/7c93ebf915d87fa84aba594bab63a2e9bec056c1dabd0f315434f3f8a7b34be2/68747470733a2f2f706f7365722e707567782e6f72672f616d6f7374616a6f2f776f726470726573732d706c7567696e2d636f72652f6c6963656e7365)](https://packagist.org/packages/amostajo/wordpress-plugin-core)

Core library for [Wordpress Plugin](https://github.com/amostajo/wordpress-plugin) (A Wordpress template that comes with composer and MVC);

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

[](#installation)

Add

```
"amostajo/wordpress-plugin-core": "1.0.*"
```

to your composer.json. Then run `composer install` or `composer update`.

Add-on development
------------------

[](#add-on-development)

WP Core now supports Add-on development. To create your custom package, simply create an Add-on main class that extends from this package abstract, like the following example:

```
namespace MyNamespace;

use Amostajo\WPPluginCore\Classes\Addon;

class PostPicker extends Addon
{
    /**
     * Function called when plugin or theme starts.
     * Add wordpress hooks (actions, filters) here.
     */
    public function init()
    {
        // YOUR CUSTOM CODE HERE.
    }

    /**
     * Function called when user is on admin dashboard.
     * Add wordpress hooks (actions, filters) here.
     */
    public function on_admin()
    {
        // YOUR CUSTOM CODE HERE.
    }
}
```

This is how you should add your Wordpress hooks:

```
namespace MyNamespace;

use Amostajo\WPPluginCore\Classes\Addon;

class PostPicker extends Addon
{
    /**
     * Function called when plugin or theme starts.
     * Add wordpress hooks (actions, filters) here.
     */
    public function init()
    {
        add_filter( 'post_content', [ &$this, 'picker_filter' ] )
    }

    /**
     * Called by wordpress.
     */
    public function picker_filter()
    {
        // YOUR CUSTOM CODE HERE.
    }
}
```

### Accessing the plugin Main class

[](#accessing-the-plugin-main-class)

You can call the main class from any custom method in your `Add-on` class, like this:

```
/**
 * Custom method.
 */
public function picker_filter()
{
    // Getting a config settings.
    $this->main->config->get( 'setting' );
}
```

Calling for Add-on's controllers or views:

### MVC

[](#mvc)

```
/**
 * Custom method.
 */
public function picker_filter()
{
    // Calling MVC.
    $this->mvc->call( 'Controller@method' );
}
```

Your controllers should be placed in a `controllers` folder on the same level as your `Add-on` class, same for the `views` folder.

### Calling ADD-ON methods from main class

[](#calling-add-on-methods-from-main-class)

The `Main` class can call methods in the Add-on by adding the `addon_` prefic, like for example `addon_picker_filter`.

### Setup plugin or theme

[](#setup-plugin-or-theme)

Finally add your package in the configuration file. For example:

```
    'addons' => [
        'MyNamespace\PostPicker',
    ],
```

Coding Guidelines
-----------------

[](#coding-guidelines)

The coding is a mix between PSR-2 and Wordpress PHP guidelines.

License
-------

[](#license)

**Lightweight MVC** is free software distributed under the terms of the MIT license.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~76 days

Recently: every ~146 days

Total

10

Last Release

3266d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.5.9

v1.0.1PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2cdad4e398292477582ba8ec4ab02a96fa645cd620518a5bcf697cd788c96c3?d=identicon)[amostajo](/maintainers/amostajo)

---

Top Contributors

[![amostajo](https://avatars.githubusercontent.com/u/1645908?v=4)](https://github.com/amostajo "amostajo (4 commits)")

---

Tags

pluginwordpresscodewordpress plugin

### Embed Badge

![Health badge](/badges/amostajo-wordpress-plugin-core/health.svg)

```
[![Health](https://phpackages.com/badges/amostajo-wordpress-plugin-core/health.svg)](https://phpackages.com/packages/amostajo-wordpress-plugin-core)
```

###  Alternatives

[justcoded/wordpress-theme-framework

Lightweight theme framework base with Model-View concept for developers who want to better organize their own custom themes.

264.1k2](/packages/justcoded-wordpress-theme-framework)[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

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

PHPackages © 2026

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