Boosts performance of critical short JavaScripts by placing their content directly into the HTML head.
As of April 2026, Inline JavaScript in Head is a WordPress head plugin with 10 active installations and a 1/5 rating from 1 reviews. It has been downloaded 1.6K+ times in total. Requires WordPress 4.0+ and PHP 5.4+. Available on WordPress.org since 2019. Last updated 5 years ago — may have compatibility concerns. Top alternative: Header and Footer Scripts.
CAUTION: This plugin is now deprecated! The successor plugin is Embed JavaScript File Content. The new plugin is rebuild from scratch and more rock solid: It respects order and position of scripts and extra scripts added via wp_add_inline_script or wp_localize_script don’t get lost. Give it a try!
In some cases you cannot wait for a JavaScript file to load, even if it is placed early in the <head> section of your template. You can benefit from better performance, if you place the JavaScript code directly inside a <script> tag into the header. This is where this plugin comes in: It provides a filter inline_javascript_in_head_handles, which takes JavaScript handles, dequeues those scripts and echos their code content inline into the head section instead of linking them via a scr…
| WordPress | 4.0+ requiredTested up to 5.4.19 |
| PHP | 5.4+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.