WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by WraithKenny v3.5.8

Scripts n Styles

This plugin allows Admin users to individually add HTML, custom CSS, Classes and JavaScript directly to Post, Pages or any other custom post types.

Scripts n Styles

The facts

Rating
4.4★ from 30
Active installs
30k+
Price
Free
Last updated
6 Jun 2023
Added
Sep 2010
Requires WP
5.0
Tested up to
WP 6.2.11
Requires PHP
7.4
Downloads
382,837

Our analysis

AI-assisted

Scripts n Styles is a WordPress plugin that enables admin users to add custom CSS and JavaScript to individual posts, pages, or custom post types. It also allows for the addition of classes to the body tag and post container, and includes a global settings page for site-wide scripts and styles.

This plugin is designed for users with admin capabilities, ensuring that only trusted individuals can insert JavaScript directly into the site. It integrates with the TinyMCE editor, allowing admins to add classes to the formats dropdown for easier styling by users.

Best for: This plugin suits WordPress site administrators who need to customise styling and scripts without coding directly into theme files.

What it does well

  • Allows custom CSS and JavaScript for posts and pages
  • Admin-only access for added security
  • Global settings for site-wide scripts and styles
  • Integrates with TinyMCE for user-friendly styling options

Where it falls short

  • No input validation, which could lead to errors
  • Requires specific theme hooks to function properly

Verdict

Scripts n Styles provides a straightforward way for admins to manage custom styles and scripts, but it requires careful handling due to the lack of input validation.

From the developer

WraithKenny's own description of Scripts n Styles, lightly tidied.

This plugin allows Admin users the ability to add custom CSS and JavaScript directly into individual Post, Pages or any other registered custom post types. You can also add classes to the body tag and the post container. There is a Global settings page for which you can write Scripts n Styles for the entire blog.

Admin’s can also add classes to the TinyMCE “Formats” dropdown which users can use to style posts and pages directly. As of Scripts n Styles 3+ styles are reflected in the post editor.

Because only well trusted users should ever be allowed to insert JavaScript directly into the pages of your site, this plugin restricts usage to admin type users. Admin’s have access to even more sensitive areas by definition, so that should be relatively safe 😉

Notes about the implementation:

  • Admin users, or more specifically, any user with the manage_options and unfiltered_html capabilities (which by default is only the admin type user) can use this plugin’s functionality. Some plugins extend user rolls, and so this plugin would naturally extend include rolls that have the appropriate capability.
  • CSS Styles are embeded, not linked, at the bottom of the head element with style tags by using wp-head. If your theme doesn’t have this hook, this plugin (as well as most others) won’t work.
  • JavaScript is embeded, not linked, at the bottom of the body (or head) element with script tags by using wp-footer (or wp-head). If your theme doesn’t have this hook, this plugin (as well as most others) won’t work.
  • There is no input validation. This plugin puts exactly what you type in the meta box directly into the html with no error checking. You are an Admin, and we trust you to be carefull. Try not to break anything.
  • Do to the licensing of the libraries used, this plugin is released “GPL 3.0 or later” if you care about those things.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for developer tooling.

WPCode

WPCode

93

Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditio...

Free 3M+ installs 4.9★ (1,873)
Header Footer Code Manager

Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for an...

Free 600k+ installs 4.9★ (309)
Admin and Site Enhancements

Duplicate post, post order, image resize, email via SMTP, admin menu editor, custom css / code, disable gutenb...

Free 200k+ installs 5★ (421)
Shortcoder

Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes wit...

Free 100k+ installs 4.9★ (227)
Insert PHP Code Snippet

Add PHP code to your pages and posts easily using shortcodes.

Free 90k+ installs 4.9★ (705)
Code Snippets

An easy, clean, and simple way to enhance your site with code snippets.

Free 1M+ installs 4.7★ (509)