manifest / performance / rt-optimizer
RT Scripts Optimizer
A WordPress plugin that improves Core Web Vitals score by loading scripts via worker thread. Keeps the main thread idle for users to interact with page as quickly as possible.
★ 24stars
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/rtcamp/rt-optimizer/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A WordPress plugin that improves Core Web Vitals score by loading scripts via worker thread. Keeps the main thread idle for users to interact with page as quickly as possible.
Features
- Uses Worker Thread - This plugin uses worker thread for all the scripts loaded via
wp_enqueue_scriptsfunction, to minimize the main thread scripts execution, and loads them only on the user interactions like tap, click, scroll or keypress events. - Disables Emojis - Removes core WP Emojis javascript to reduce extra script execution.
How it works?
- With the help of
rt_scripts_handlerfunction hooked withscripts_loader_tagfilter, the function outputs all script tags withtype="text/rtscript"which are loaded viawp_enqueue_scripts. - You can filter or skip some javascripts incase any error occurs by adding script handle like this and then scripts will load normally on main thread by path or handles via backend plugin option.
