jazzman / wp-performance
wp-performance
Installs: 1 445
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 4
Type:wordpress-muplugin
pkg:composer/jazzman/wp-performance
Requires
- php: ^8.2
 - composer/installers: ^2.2
 - jazzman/autoload-interface: ^0.3.1
 - jazzman/wp-app-config: ^2.3
 - jazzman/wp-db-pdo: ^0.1.5
 
Requires (Dev)
- jazzman/php-cs-fixer-rules: ^0.2.1
 - jetbrains/phpstorm-attributes: @dev
 - php-stubs/wordpress-stubs: ^6.3
 - phpstan/extension-installer: ^1.3
 - rector/rector: ^0.17.13
 - roave/security-advisories: @dev
 - roots/wordpress: ^6.3
 - szepeviktor/phpstan-wordpress: ^1.3
 
- dev-master
 - 3.5.0
 - 3.4.5
 - 3.4.4
 - 3.4.3
 - 3.4.2
 - 3.4.1
 - 3.4.0
 - 3.3.1
 - 3.3.0
 - 3.2.6
 - 3.2.5
 - 3.2.4
 - 3.2.3
 - 3.2.2
 - 3.2.1
 - 3.2.0
 - 3.1.1
 - 3.1.0
 - 3.0.2
 - 3.0.1
 - 3.0.0
 - 2.2.7
 - 2.2.6
 - 2.2.5
 - 2.2.4
 - 2.2.3
 - 2.2.0
 - 2.1.0
 - 2.0.1
 - 2.0.0
 - 1.9.9
 - 1.9.8
 - 1.9.7
 - 1.9.6
 - 1.9.5
 - 1.9.4
 - 1.9.3
 - 1.9.2
 - 1.9.1
 - 1.9
 - 1.8.1
 - 1.8
 - 1.7
 - 1.6
 - 1.5
 - 1.4.6
 - 1.4.5
 - 1.4.4
 - 1.4.3
 - 1.4.2
 - 1.4.1
 - 1.4
 - 1.3
 - 1.2
 - 1.1
 - 1.0
 - 0.9.2.2
 - 0.9.2.1
 - 0.9.2
 - 0.9.1
 - 0.9
 - 0.8.9
 - 0.8.8
 - 0.8.7
 - 0.8.6
 - 0.8.5
 - 0.8.4
 - 0.8.3
 - 0.8.2
 - 0.8.1
 - 0.7.1
 - 0.7
 - 0.6
 - 0.5
 - 0.3
 - 0.2
 - dev-dependabot/composer/rector/rector-tw-2.2
 - dev-dependabot/github_actions/actions/checkout-5
 - dev-dependabot/composer/szepeviktor/phpstan-wordpress-tw-2.0
 - dev-develop
 - dev-dependabot/github_actions/actions/cache-4
 - dev-dependabot/add-v2-config-file
 
This package is auto-updated.
Last update: 2025-11-03 21:05:21 UTC
README
Comprehensive WordPress performance optimization and security hardening plugin
The Problem
WordPress out-of-the-box includes numerous features that most sites don't need:
- Excessive HTTP requests for scripts and styles
 - Hundreds of unnecessary database queries
 - Bloated wp_head output with meta tags, feeds, and generator tags
 - Constant update checks for core, plugins, and themes
 - Inefficient media handling and image size generation
 - Missing input sanitization and security hardening
 
Result: Slower page loads, higher server costs, security vulnerabilities, poor user experience.
The Solution
WP Performance is a comprehensive must-use plugin that:
- ✅ Eliminates bloat - Removes 50+ unnecessary WordPress features
 - ✅ Optimizes queries - Reduces database calls by 30-50%
 - ✅ Enhances security - Adds input sanitization and hardening
 - ✅ Zero configuration - Works out-of-the-box
 - ✅ Production-tested - Battle-tested on high-traffic sites
 - ✅ Modern codebase - PHP 8.2+, PSR-4, comprehensive quality tooling
 
Key Features
🚀 Performance Optimization
Script & Style Management (Enqueue Module)
- Remove WordPress version from scripts and styles
 - Disable emoji scripts and styles
 - Remove DNS prefetch for s.w.org
 - Clean up script/style tags
 - Optimize jQuery loading
 
Database Query Optimization (WPQuery Module)
- Optimize 
WP_Querywith smart caching - Reduce term count queries
 - Optimize post meta queries
 - Improve last modified time queries
 
Media Optimization (Media Module)
- Disable unnecessary image sizes
 - Lazy load images
 - Optimize image generation
 - Remove image size suffix
 - Prevent WebP conversion for specific formats
 
Update Management (Update Module)
- Disable WordPress core update checks
 - Disable plugin update checks
 - Disable theme update checks
 - Remove update nag screens
 - Reduce HTTP requests to WordPress.org
 
General Cleanup (CleanUp Module)
- Remove RSD link, WLW manifest, shortlink
 - Disable REST API discovery
 - Remove WordPress generator tag
 - Clean up wp_head bloat
 - Disable XML-RPC when not needed
 
🔐 Security Hardening
Input Sanitization (Sanitize Module)
- Sanitize 
$_GET,$_POST,$_REQUESTsuperglobals - Prevent XSS attacks
 - Clean user input automatically
 - Validate URLs and paths
 
General Security
- Remove version information exposure
 - Disable file editing in admin
 - Harden WordPress configuration
 
⚡ SQL Query Optimization
Term Count Optimization
- Optimized term counting for better performance
 - Reduced database calls for taxonomy queries
 - Smart caching for term counts
 
Post GUID Optimization
- Optimize post GUID queries
 - Improve permalink performance
 
Post Meta Optimization
- Efficient meta query handling
 - Reduce meta table lookups
 
Installation
composer require jazzman/wp-performance
Dependencies
This package is part of the jazzman WordPress ecosystem and depends on:
jazzman/autoload-interface- Autoloading interfacejazzman/wp-app-config- Configuration managementjazzman/wp-db-pdo- PDO database layer
All dependencies are installed automatically via Composer.
Configuration
The plugin works out-of-the-box with sensible defaults for most sites. No configuration needed.
Architecture
Module-Based Design
src/
├── Optimization/          # Performance optimization modules
│   ├── CleanUp.php       # Remove WordPress bloat
│   ├── Enqueue.php       # Optimize scripts and styles
│   ├── LastPostModified.php # Caching optimization
│   ├── Media.php         # Image and media optimization
│   ├── PostGuid.php      # GUID optimization
│   ├── PostMeta.php      # Meta query optimization
│   ├── TermCount.php     # Term count optimization
│   ├── Update.php        # Update check management
│   └── WPQuery.php       # Query optimization
├── Security/              # Security hardening modules
│   └── Sanitize.php      # Input sanitization
└── Utils/                 # Utility classes
Quality Tools
- ✅ PHPStan (max level with baseline)
 - ✅ Psalm (strict mode with baseline)
 - ✅ PHPMD (mess detection with baseline)
 - ✅ PHP CS Fixer (PSR-12 compliance)
 - ✅ Rector (automated refactoring)
 - ✅ Roave Security Advisories (dependency scanning)
 
CI/CD
GitHub Actions workflows for:
- Code quality checks on PR
 - Static analysis
 - Code style validation
 - Security scanning
 
Requirements
- PHP: 8.2+ (strictly enforced)
 - WordPress: 6.0+
 - Composer: For installation and autoloading
 
Why This Plugin Exists
After years of WordPress development across hundreds of sites, I identified common performance bottlenecks:
- Default WordPress includes 50+ features most sites never use
 - Each feature adds HTTP requests, database queries, and processing time
 - Manual optimization is tedious and error-prone
 - Most performance plugins focus on caching, not eliminating unnecessary features
 
WP Performance takes a different approach: Instead of caching bloat, eliminate it at the source.
Related Packages
Part of the jazzman WordPress ecosystem:
jazzman/wp-object-cache- PSR-16 object cachingjazzman/wp-nav-menu-cache- Navigation menu cachingjazzman/wp-password-argon- Argon2i password hashingjazzman/wp-lscache- LiteSpeed cache integrationjazzman/wp-geoip- GeoIP functionality
Contributing
Found a bug? Have a feature request? Contributions welcome!
- Fork the repository
 - Create feature branch (
git checkout -b feature/amazing) - Run quality checks (
composer phpstan && composer psalm && composer cs-check) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
 
Support
⭐ If WP Performance improved your site, please star the repo!
💬 Questions? Open an issue on GitHub
Built with ❤️ for the WordPress community