Psydox WP Hub
A WordPress plugin manager that enables installation, updates, and management of Psydox plugins directly from GitHub repositories.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/psydox/psydox-wp-hub/archive/refs/heads/main.zipPsydox WP Hub is a centralized management plugin for approved Psydox WordPress plugins.
It provides one control panel inside WordPress Admin to discover, install, activate, deactivate, update, and uninstall Psydox plugins that are explicitly listed in a central registry.
License
This plugin is licensed under GPL v2 or later.
Compatibility
- WordPress: 6.5+
- PHP: 8.2+
- MySQL: 8+
Project Identity
- Plugin name: Psydox WP Hub
- Slug: psydox-wp-hub
- Text domain: psydox-wp-hub
- Namespace: Psydox\WPHub
- Author: Psydox
- Repository: https://github.com/Psydox/psydox-wp-hub
Core Goals
Psydox WP Hub v1 is focused on plugin lifecycle operations for approved Psydox plugins:
- Discover approved Psydox plugins from a central registry.
- Install plugins directly from GitHub Releases packages.
- Activate installed plugins.
- Deactivate active plugins.
- Detect available updates by comparing installed and remote versions.
- Update an individual plugin.
- Update all plugins with available updates.
- Uninstall plugins cleanly through WordPress APIs.
- View plugin information.
- View plugin changelogs.
Out of scope for v1:
- Premium licensing
- Themes
- Backups
- Marketplace features
- Cloud services
- Analytics
- Commercial features
Central Registry Model
Psydox WP Hub does not scan all GitHub repositories.
Only plugins listed in a single controlled registry file are shown in Hub pages.
Default registry URL:
https://raw.githubusercontent.com/Psydox/wp-plugin-registry/main/registry.json
Registry example:
{
"version": "1.0",
"plugins": [
{
"slug": "psydox-seo",
"metadata_url": "https://raw.githubusercontent.com/Psydox/psydox-seo/main/plugin.json"
},
{
"slug": "psydox-security",
"metadata_url": "https://raw.githubusercontent.com/Psydox/psydox-security/main/plugin.json"
}
]
}
Plugin metadata example:
{
"name": "Psydox SEO",
"slug": "psydox-seo",
"version": "1.0.0",
"author": "Psydox",
"description": "SEO toolkit for WordPress.",
"requires_wp": "6.5",
"requires_php": "8.2",
"repository": "https://github.com/Psydox/psydox-seo",
"download_url": "https://github.com/Psydox/psydox-seo/releases/latest/download/psydox-seo.zip",
"changelog_url": "https://github.com/Psydox/psydox-seo/releases"
}
Admin Menu Structure
Psydox
- Dashboard
- Plugins
- Updates
- Settings
- About
Dashboard
Dashboard provides:
- Installed Psydox plugins count
- Available updates count
- System information
- WordPress version
- PHP version
- Hub version
- Registry status
- Last registry synchronization
- Last update check
- Hub status and operational messages
Plugins Page
Lists all plugins declared in registry with columns:
- Plugin name
- Description
- Installed version
- Latest version
- Status
Supported actions:
- Install
- Activate
- Deactivate
- Update
- Uninstall
- View details
Each action returns WordPress admin notices for success or failure.
Updates Page
Shows only plugins with available updates:
- Plugin name
- Installed version
- Latest version
- Update available status
Actions:
- Update
- Update All
The update workflow uses native WordPress updater APIs.
Settings Page
Managed via WordPress Settings API.
Configurable options:
- Registry URL
- Cache duration
- Enable debug logging
- Enable beta releases
- Automatic update checks
Installation and Lifecycle Workflows
Install workflow:
- Download plugin ZIP from download_url.
- Validate package through WordPress upgrader APIs.
- Install with Plugin_Upgrader.
- Refresh plugin cache/state.
- Show admin notice.
Activate workflow:
- Check capability.
- Validate target plugin file.
- Activate via native plugin APIs.
- Show admin notice.
Deactivate workflow:
- Check capability.
- Deactivate via native plugin APIs.
- Show admin notice.
Update detection:
- Installed version is compared to remote metadata version using version_compare.
Update workflow:
- Download latest ZIP package.
- Verify package and permissions.
- Run Plugin_Upgrader update routine.
- Refresh metadata and plugin cache.
- Show admin notice.
Uninstall workflow:
- Confirm action.
- Deactivate plugin if active.
- Run plugin uninstall routine through WordPress deletion APIs.
- Remove plugin files using native delete APIs.
- Refresh Hub view and status.
No direct manual filesystem deletion is performed by Hub logic.
Caching Strategy
Caching uses WordPress Transients API.
Cached resources:
- Registry payload
- Plugin metadata payloads
- Update snapshot data
Default cache duration: 6 hours (configurable in settings).
Security Model
The plugin follows WordPress Coding Standards and includes:
- Capability checks for all lifecycle actions
- Nonce verification for admin actions
- Input sanitization
- Output escaping
- CSRF protection in action handlers
- XSS protection through escaped output and safe rendering
- Prepared SQL for uninstall transient cleanup
Architecture
Primary namespace: Psydox\WPHub
Object-oriented modular architecture with dependency-driven service wiring.
Key classes:
- Plugin
- Bootstrap
- AdminMenu
- DashboardPage
- PluginsPage
- UpdatesPage
- SettingsPage
- AboutPage
- RegistryService
- PluginMetadataService
- PluginInstaller
- PluginUpdater
- PluginActivator
- PluginDeactivator
- PluginUninstaller
- SettingsManager
- CacheManager
- Logger
Folder Structure
psydox-wp-hub/
├── psydox-wp-hub.php
├── uninstall.php
├── assets/
│ ├── css/
│ ├── js/
│ └── images/
├── templates/
├── languages/
├── includes/
│ ├── Admin/
│ ├── Core/
│ ├── Services/
│ ├── Installer/
│ ├── Updater/
│ ├── Registry/
│ ├── Cache/
│ ├── Settings/
│ └── Helpers/
├── vendor/
├── docs/
└── composer.json
Database Requirements
No custom database tables are required for v1.
Storage usage:
- One settings option record for plugin configuration
- Transient records for cache entries
- Optional timestamp options for diagnostics
Hook Map
Core runtime hooks:
- plugins_loaded
- init
- admin_menu
- admin_enqueue_scripts
- admin_notices
Action handlers:
- admin_post_psydox_hub_sync_registry
- admin_post_psydox_hub_install
- admin_post_psydox_hub_activate
- admin_post_psydox_hub_deactivate
- admin_post_psydox_hub_update
- admin_post_psydox_hub_update_all
- admin_post_psydox_hub_uninstall
Scheduled hooks:
- psydox_wp_hub_update_check
Open Source Notes
- GPL v2 or later compatible
- WordPress Coding Standards aligned
- Native WordPress APIs prioritized over custom low-level logic
Development Setup
- Place plugin in wp-content/plugins/psydox-wp-hub.
- Activate Psydox WP Hub from WordPress Admin.
- Open Psydox menu in wp-admin.
- Configure registry URL and cache options in Settings.
- Synchronize registry and manage approved plugins.
Future Roadmap
Potential post-v1 improvements:
- Stronger release-signature verification
- Optional integrity checksum fields in metadata
- CLI support for automation
- Enhanced telemetry with explicit opt-in
- Integration test suite and QA matrix expansion
- Internationalization completion across all UI strings