PHPackages                             ernilambar/optiz - 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. ernilambar/optiz

ActiveLibrary[Framework](/categories/framework)

ernilambar/optiz
================

Lightweight schema-driven settings framework for WordPress

1.0.0(1mo ago)0105↓100%MITPHPPHP &gt;=8.0CI passing

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/ernilambar/optiz)[ Packagist](https://packagist.org/packages/ernilambar/optiz)[ Docs](https://github.com/ernilambar/optiz)[ RSS](/packages/ernilambar-optiz/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

Optiz
=====

[](#optiz)

Lightweight schema-driven settings framework for WordPress. Plugins bundle this library to generate admin settings pages from a PHP array — no UI builder required.

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

[](#requirements)

- PHP 8.0+
- WordPress 6.0+

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

[](#installation)

```
composer require ernilambar/optiz
```

Include the entry point in your plugin bootstrap **before** `plugins_loaded`:

```
require_once __DIR__ . '/vendor/ernilambar/optiz/init.php';
```

When multiple plugins bundle different versions, `init.php` automatically elects the highest version — only one copy runs.

Quick start
-----------

[](#quick-start)

Register the schema on `init` (or later). Registering earlier — e.g. on `plugins_loaded` — calls `__()` before WordPress is ready to load translations and triggers a `_doing_it_wrong` notice in WP 6.7+.

```
add_action( 'init', function () {
    \Nilambar\Optiz\Manager::register( 'my_plugin', [
        'option_key' => 'my_plugin_options',
        'page'       => [
            'title'     => __( 'My Plugin', 'textdomain' ),
            'menu_slug' => 'my-plugin-settings',
        ],
        'tabs' => [
            [
                'id'     => 'general',
                'label'  => __( 'General', 'textdomain' ),
                'fields' => [
                    [
                        'id'      => 'api_key',
                        'type'    => 'text',
                        'label'   => __( 'API Key', 'textdomain' ),
                        'default' => '',
                    ],
                    [
                        'id'      => 'enable_feature',
                        'type'    => 'toggle',
                        'label'   => __( 'Enable Feature', 'textdomain' ),
                        'default' => false,
                    ],
                ],
            ],
        ],
    ] );
} );
```

Read a saved value anywhere in the plugin:

```
$value = \Nilambar\Optiz\Manager::instance( 'my_plugin' )->get( 'api_key' );
```

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

[](#documentation)

See [docs/DOCS.md](docs/DOCS.md) for the full reference: schema, all field types, type-specific options, sanitization, conditional fields, and the Manager API.

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

31d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2098823?v=4)[Nilambar Sharma](/maintainers/ernilambar)[@ernilambar](https://github.com/ernilambar)

---

Top Contributors

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

---

Tags

wordpresswordpress-packageframeworkschemawordpressSettingsoptionsadmin

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ernilambar-optiz/health.svg)

```
[![Health](https://phpackages.com/badges/ernilambar-optiz/health.svg)](https://phpackages.com/packages/ernilambar-optiz)
```

###  Alternatives

[redux-framework/redux-framework

Build better and beautiful sites in WordPress, faster.

1.8k6.2k](/packages/redux-framework-redux-framework)[gambitph/titan-framework

Titan Framework allows theme and plugin developers to create admin pages, options, meta boxes, and theme customizer options with just a few simple lines of code.

37716.2k](/packages/gambitph-titan-framework)[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)
