Current Behavior
The fs_accounts option is being queried on every plugins page load through update_option(), loading a large serialized array containing license and configuration data.
Query:
SELECT autoload
FROM wp_options
WHERE option_name = 'fs_accounts'
LIMIT 1
Performance Impact
- Executes on every plugins page load
- Loads large serialized array
- Takes ~0.0005s per execution
- Unnecessary frequent checks for data that doesn't change often
Suggested Improvements
-
Implement caching for license and configuration data
- Cache data for a set period (e.g., 24 hours)
- Only refresh when truly needed
-
Move license verification to async background process
- Use WordPress cron for periodic checks
- Update data in background
-
Optimize data structure
- Only load required fields
- Consider splitting data into smaller chunks
Benefits
- Reduced database queries
- Improved plugins page load time
- Better resource utilization
- Enhanced scalability for sites with many Freemius-powered plugins
Would you consider implementing these optimizations to improve performance for sites using the Freemius SDK?
Current Behavior
The
fs_accountsoption is being queried on every plugins page load throughupdate_option(), loading a large serialized array containing license and configuration data.Query:
Performance Impact
Suggested Improvements
Implement caching for license and configuration data
Move license verification to async background process
Optimize data structure
Benefits
Would you consider implementing these optimizations to improve performance for sites using the Freemius SDK?