PHPackages                             andreilupu/wp-sockets - 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. andreilupu/wp-sockets

ActiveLibrary[Framework](/categories/framework)

andreilupu/wp-sockets
=====================

Core PHP library for WP Sockets - A modern React-powered admin page framework for WordPress.

v0.1.0-alpha.2(5mo ago)311GPL-2.0-or-laterPHPPHP &gt;=7.4

Since Dec 1Pushed 5mo agoCompare

[ Source](https://github.com/andreilupu/wp-sockets-composer)[ Packagist](https://packagist.org/packages/andreilupu/wp-sockets)[ RSS](/packages/andreilupu-wp-sockets/feed)WikiDiscussions main Synced 1mo ago

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

WP Sockets Core
===============

[](#wp-sockets-core)

A modern, React-powered framework for building WordPress Admin Pages. This library bridges the gap between PHP and React, allowing you to define admin interfaces declaratively while handling all the complexity of asset management, React mounting, and data persistence.

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

[](#installation)

```
composer require andreilupu/wp-sockets-core
```

Examples
--------

[](#examples)

For complete working examples demonstrating both Composer and NPM integration methods, see the [wp-sockets-examples](https://github.com/andreilupu/wp-sockets-examples) repository.

Usage
-----

[](#usage)

### 1. Initialize the Library

[](#1-initialize-the-library)

In your plugin's `init` hook (or `plugins_loaded`), initialize the library.

```
use function WPSockets\Core\wp_sockets_init;

add_action( 'init', function() {
    // Basic initialization
    wp_sockets_init();

    // OR with custom assets URL (useful for symlinked local development)
    // wp_sockets_init( plugin_dir_url( __FILE__ ) . 'vendor/andreilupu/wp-sockets-core/assets' );
} );
```

### 2. Register an Admin Page

[](#2-register-an-admin-page)

Use `wp_sockets_register_page` to define your admin page and its components ("sockets").

```
use function WPSockets\Core\wp_sockets_register_page;

add_action( 'init', function() {
    wp_sockets_register_page( 'my-plugin-settings', [
        'page_title' => 'My Plugin Settings',
        'menu_title' => 'My Plugin',
        'capability' => 'manage_options',
        'mode'       => 'panel', // 'panel' or 'tabs'
        'sockets'    => [
            [
                'id'    => 'general_section',
                'type'  => 'group',
                'label' => 'General Settings',
                'children' => [
                    [
                        'id'    => 'api_key',
                        'type'  => 'text',
                        'label' => 'API Key',
                    ],
                    [
                        'id'    => 'enable_feature',
                        'type'  => 'checkbox', // Assuming checkbox type exists or will exist
                        'label' => 'Enable Feature',
                    ]
                ]
            ]
        ]
    ] );
} );
```

Advanced Usage
--------------

[](#advanced-usage)

### Custom Socket Types

[](#custom-socket-types)

You can register custom socket types using JavaScript hooks. See [EXTENSIBILITY.md](EXTENSIBILITY.md) for details.

### Data Helpers

[](#data-helpers)

By default, settings are saved to the WordPress Options API. You can override this to save to User Meta or custom tables.

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

[](#requirements)

- PHP &gt;= 7.4
- WordPress &gt;= 6.0

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance70

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity24

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

Every ~0 days

Total

4

Last Release

168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b8439faf05e34a2019a97889fd6ef5cb76c31f07487bcb44d815bdc9f1f8122?d=identicon)[andreilupu](/maintainers/andreilupu)

---

Top Contributors

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

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/andreilupu-wp-sockets/health.svg)

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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