https://github.com/rtcamp/rt-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.
https://github.com/rtcamp/rt-optimizer
core-web-vitals optimization optimizer
Last synced: 6 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/rtcamp/rt-optimizer
- Owner: rtCamp
- License: gpl-2.0
- Created: 2021-10-15T13:31:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T06:34:35.000Z (11 months ago)
- Last Synced: 2025-06-22T15:09:49.284Z (7 months ago)
- Topics: core-web-vitals, optimization, optimizer
- Language: PHP
- Homepage:
- Size: 414 KB
- Stars: 24
- Watchers: 35
- Forks: 6
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
## Features
1. **Uses Worker Thread** - This plugin uses worker thread for all the scripts loaded via `wp_enqueue_scripts` function, to minimize the main thread scripts execution, and loads them only on the user interactions like tap, click, scroll or keypress events.
2. **Disables Emojis** - Removes core WP Emojis javascript to reduce extra script execution.
## How it works?
1. With the help of `rt_scripts_handler` function hooked with `scripts_loader_tag` filter, the function outputs all script tags with `type="text/rtscript"` which are loaded via `wp_enqueue_scripts`.
2. 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.
## Does this interest you?
