High-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).
- 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
- PHP 8.1+
- WordPress 6.0+
- MySQL 5.7+ or MariaDB 10.2+
cd wp-content/plugins
git clone https://github.com/gotoweb/shadow-orm.git
cd shadow-orm
composer install- Download the latest release from Releases
- Upload to
wp-content/plugins/shadow-orm/ - Run
composer install - Activate in WordPress Admin
# 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=10Navigate to Settings → ShadowORM to:
- Enable/disable the system
- Toggle shadow tables per post type
- View migration status
- Sync or rollback tables
| 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 | ❌ | ✅ |
| 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 |
- 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
| 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
# Run tests
./vendor/bin/phpunit --testsuite=unit
# Static analysis
./vendor/bin/phpstan analyse
# Code style
./vendor/bin/phpcs src/- 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
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Email: kontakt@gotoweb.pl
gotoweb.pl - WordPress & WooCommerce Experts
- Website: https://gotoweb.pl
- Email: kontakt@gotoweb.pl
- Pro Version: https://gotowebplugins.com/shadow-orm-pro
This project is licensed under the GPL-2.0-or-later License - see the LICENSE file for details.
Made with ❤️ by gotoweb.pl