SmartSite Optimizer
SmartSite Optimizer is a powerful WordPress plugin that provides enterprise-level performance optimization and analytics features to help you deliver the fastest possible user experience.
Key Features
Intelligent Asset Management * Automatic CSS/JS deferral with intelligent dependency mapping * Critical CSS inlining for above-the-fold content * Image lazy loading with blur-up placeholder effects * Font display optimization with preloading support
Advanced Caching System * Page caching with smart invalidation rules * Database query optimization with result caching * Object cache support for Redis and Memcached * Browser caching headers with optimal expiry times
Real-time Analytics Dashboard * Core Web Vitals monitoring (LCP, FID, CLS, TTFB, FCP) * Performance score tracking with historical data * User behavior metrics without external dependencies * Custom event tracking API for developers
Automated Optimization Features * Image compression on upload with quality settings * WebP conversion for modern browsers * Code minification for HTML, CSS, and JavaScript * DNS prefetching for external domains * Resource preloading for critical assets
Technical Highlights
- Object-oriented PHP with proper namespace structure
- WordPress coding standards compliant
- Modular architecture with enable/disable controls
- Comprehensive error handling and logging
- WP-CLI commands for automation
- Extensible hooks and filters API
- Multisite compatible
Advanced Usage
WP-CLI Commands
Clear all caches: wp sso cache clear
Clear page cache only: wp sso cache clear-pages
View cache statistics: wp sso cache stats
Optimize all images: wp sso optimize images
Optimize with limit: wp sso optimize images –limit=50
Run all optimizations: wp sso optimize all
Custom Event Tracking
Track custom events in your theme or plugin:
if ( function_exists( 'sso' ) && sso()->analytics ) {
sso()->analytics->track_event( 'button_click', array(
'url' => get_permalink(),
'value' => 1
) );
}
Hooks and Filters
Exclude URLs from asset optimization:
add_filter( 'sso_exclude_asset_optimization', function( $exclude ) {
if ( is_page( 'special-page' ) ) {
return true;
}
return $exclude;
} );
Exclude scripts from deferral:
add_filter( 'sso_defer_js_excluded', function( $excluded ) {
$excluded[] = 'my-critical-script';
return $excluded;
} );
Modify critical CSS:
add_filter( 'sso_critical_css', function( $css, $page_type ) {
// Add your custom critical CSS
return $css . 'body { font-display: swap; }';
}, 10, 2 );
Support
For support, feature requests, or bug reports, please visit our support forum or contact us at support@devkamran.com
Credits
Developed by devkamran
