Performance Optimization Tips
1. Enable Asset Optimization
Settings → Attributes User Access → Performance
☑️ Minify CSS files
☑️ Minify JavaScript files
☑️ Load assets only on login pages
☑️ Defer non-critical scripts
2. Database Optimization
// Clean up old sessions regularly
Settings → Security → Session Management
Session Cleanup: Daily
// Limit audit log retention
Settings → Audit Log → Retention
Keep logs for: 90 days
3. Reduce External Requests
- Host Google Fonts locally instead of external
- Self-host reCAPTCHA assets if possible
- Minimize third-party integrations
4. Use Object Caching
// Install Redis or Memcached
// Enable object caching in wp-config.php
define('WP_CACHE_KEY_SALT', 'yoursite.com');
// Plugin automatically uses object cache when available
5. Optimize Images
- Compress logos and background images
- Use WebP format when possible
- Set proper image dimensions in CSS
- Use lazy loading for background images
Performance Monitoring
Tools to Use:
- Google PageSpeed Insights
- GTmetrix
- Pingdom Tools
- Query Monitor plugin
Key Metrics:
Target performance:
- Page load time: < 2 seconds
- Time to Interactive: < 3 seconds
- Database queries: < 20 per page
- Page size: < 500 KB
Advanced Optimizations
Lazy Load Non-Critical Features:
// Load 2FA scripts only when needed
Settings → Advanced → Script Loading
☑️ Conditional script loading
Database Query Optimization:
// Add database indexes (advanced)
ALTER TABLE wp_attrua_sessions
ADD INDEX idx_user_id (user_id);
ALTER TABLE wp_attrua_logs
ADD INDEX idx_timestamp (timestamp);
Troubleshooting Slow Performance
- Install Query Monitor plugin
- Check for slow database queries
- Identify plugins causing delays
- Review server resources (CPU, RAM)
- Test with different hosting provider if needed