manifest / performance / shadow-orm
ShadowORM MySQL Accelerator
High-performance ORM layer for WordPress/WooCommerce with Shadow Tables
★ 0stars
0forks
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/gotowebpl/shadow-orm/archive/refs/heads/main.zipHigh-performance ORM layer for WordPress/WooCommerce with Shadow Tables
ShadowORM dramatically accelerates meta queries by storing post metadata in optimized "shadow tables" with native JSON support (MySQL 8.0+) or lookup tables (MySQL 5.7/MariaDB).
Features
- Dual-Driver Strategy - Automatic detection of MySQL version
- MySQL 8.0+: Native JSON columns with Multi-Valued Indexes
- MySQL 5.7/MariaDB: Lookup tables with standard JOINs
- Zero Configuration - Works out of the box after activation
- WP-CLI Support - Full command-line interface for migrations
- Admin Panel - Visual management of shadow tables
- Transparent Integration - Intercepts
get_post_meta()automatically - RAM Cache - In-memory caching for repeat reads
Requirements
- PHP 8.1+
- WordPress 6.0+
- MySQL 5.7+ or MariaDB 10.2+
Installation
Via Composer
cd wp-content/plugins
git clone https://github.com/gotoweb/shadow-orm.git
cd shadow-orm
composer install
Manual
- Download the latest release from Releases
- Upload to
wp-content/plugins/shadow-orm/ - Run
composer install - Activate in WordPress Admin
Quick Start
# Check status
wp shadow status
# Migrate posts
wp shadow migrate --type=post
# Migrate all supported types
wp shadow migrate --all
# Benchmark performance
wp shadow benchmark --type=product --iterations=10
Admin Panel
Navigate to Settings → ShadowORM to:
- Enable/disable the system
- Toggle shadow tables per post type
- View migration status
- Sync or rollback tables
Free vs Pro
| Feature | Free | Pro |
|---|---|---|
| Database Optimization | ||
| MySQL 8.0 Native JSON | ✅ | ✅ |
| MySQL 5.7 Lookup Tables | ✅ | ✅ |
| WP-CLI Commands | ✅ | ✅ |
| Admin Panel | ✅ | ✅ |
| RAM Cache | ✅ | ✅ |
| Caching System | ||
| Object Cache (Redis/Memcached) | ❌ | ✅ |
| Page Cache (Full HTML) | ❌ | ✅ |
| Query Cache (WP_Query results) | ❌ | ✅ |
| Tag-based auto-invalidation | ❌ | ✅ |
| Symfony Filesystem fallback | ❌ | ✅ |
| WooCommerce | ||
| Simple Products | ✅ | ✅ |
| Product Variations | ❌ | ✅ |
| Stock/Price cache exclusion | ❌ | ✅ |
| WooCommerce Optimizer | ❌ | ✅ |
| Integrations | ||
| ACF Repeater/Flexible | ❌ | ✅ |
| WPML/Polylang Support | ❌ | ✅ |
| Admin Features | ||
| Virtual Mode | ❌ | ✅ |
| Advanced Dashboard | ❌ | ✅ |
| Transients Management | ❌ | ✅ |
| Autoload Optimization | ❌ | ✅ |
| Priority Support | ❌ | ✅ |
WP-CLI Commands
| Command | Description |
|---|---|
wp shadow status |
Show migration status for all types |
wp shadow migrate --type=<type> |
Migrate specific post type |
wp shadow migrate --all |
Migrate all configured types |
wp shadow migrate --dry-run |
Preview without changes |
wp shadow rollback --type=<type> |
Remove shadow table |
wp shadow benchmark --type=<type> |
Performance benchmark |
How It Works
- Activation: Plugin installs
db.phpdrop-in and MU-plugin loader - Migration:
wp shadow migratecopies meta to shadow tables - Read Interception:
get_post_meta()reads from shadow tables first - Write Sync:
save_posthook keeps shadow tables updated - Query Optimization:
meta_queryuses JSON functions or lookup JOINs
Performance
| Scenario | Without ShadowORM | With ShadowORM |
|---|---|---|
| Single meta read | ~2ms | <0.5ms |
| 50 products with filters | ~200ms | ~50ms |
| Category page TTFB | ~400ms | ~150ms |
Results on VPS with 2 vCPU, 4GB RAM, MySQL 8.0
Development
# Run tests
./vendor/bin/phpunit --testsuite=unit
# Static analysis
./vendor/bin/phpstan analyse
# Code style
./vendor/bin/phpcs src/
Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
Support
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Email: kontakt@gotoweb.pl
Author
gotoweb.pl - WordPress & WooCommerce Experts
- Website: https://gotoweb.pl
- Email: kontakt@gotoweb.pl
- Pro Version: https://gotowebplugins.com/shadow-orm-pro
License
This project is licensed under the GPL-2.0-or-later License - see the LICENSE file for details.
Made with ❤️ by gotoweb.pl