Plugin profile · Utilities Hidden by the free version

WPCode: review, strengths and recommended settings

WPCode, formerly Insert Headers and Footers, adds header scripts and PHP, CSS or JavaScript snippets without touching your theme. Our take on the free and Pro versions, the settings that keep your site from breaking and the patched vulnerabilities worth knowing.

The essentials

  • Best for adding tracking codes and small PHP snippets without editing your theme or its functions.php.
  • Main caveat: revisions, Testing Mode and page scripts are only in the paid versions.
  • Free; Pro starts at $99 a year for one site ($49 for the first year).

Key facts

Category
Utilities
Vendor
WPCode LLC
Price
Free + paid version Free; WPCode Pro from $99 per year for one site ($49 for the first year)
Active installations
3,000,000+
WordPress.org rating
4.9/5 (1,917 reviews)
Last updated
(Version 2.4.1)
Requirements
WordPress 5.0+, PHP 7.0+
Analyze a site

Figures: WordPress.org

WPCode: review, strengths and recommended settings

What WPCode does inside WordPress

WPCode is a code snippets manager: it lets you add PHP, JavaScript, CSS, HTML or text from the admin area without editing your theme's functions.php file. Snippets are stored in the database, so they survive a theme update or a theme switch. Each snippet is inserted automatically at a location you pick (everywhere, admin only, before or after the content, after a given paragraph...) or manually with a shortcode.

The plugin also adds a "Header & Footer" screen with three fields (header, right after the opening body tag, footer) for pasting tracking or verification code, a library of ready-made snippets, code generators and conditional logic: type of page, post type, page URL, referrer, taxonomy, logged-in status or user role. Before a PHP snippet goes live, WPCode runs it once and leaves it inactive if it throws an error. It can import snippets from Code Snippets, Header Footer Code Manager, Post Snippets, Simple Custom CSS and JS and Woody Code Snippets.

Syed Balkhi and the WPBeginner team created it in 2011 as Insert Headers and Footers, and it was renamed WPCode in 2022 (its folder is still called insert-headers-and-footers). WPCode is a trademark of WPCode LLC. The paid version, WPCode Pro, adds scheduling, revisions, Testing Mode and page scripts from the Basic plan up; higher plans bring automatic conversion pixels (Plus) and role-based access control (Pro).

Diagram: WPCode works on visitors and bots, wordpress, database and files. Public traces: folder name (hidden with Pro); tag IDs (hidden with Pro).

Which sites WPCode is a good fit for

WPCode pays off as soon as you regularly add small pieces of code:

  • Sites that paste third-party code: a Google Analytics tag, an ad pixel, AdSense or Search Console verification, without touching the theme.
  • Freelancers and small teams: PHP tweaks live in a named list you can switch on and off one by one, instead of an ever-growing functions.php.
  • Sites replacing small single-purpose plugins: the library has snippets to disable comments or XML-RPC, allow SVG uploads and more.

It's the wrong tool if your code lives in Git and ships through a deployment pipeline: a custom plugin or an mu-plugin stays easier to track. If all you need is one script in the header, WPCode's "Headers & Footers mode" or Header Footer Code Manager will do; to compare it with its closest rival, see our Code Snippets review.

WPCode strengths and limitations

Strengths

  • Free safety nets. A test run before activation, automatic deactivation of failing snippets in the admin, and a safe mode triggered by a URL parameter.
  • Conditional logic included. The free version already filters by type of page, URL, referrer, user role or logged-in status.
  • Library and generators. Common snippets install in one click, and generators write the code for post types or structured data.
  • Easy migration. Importers for five competing plugins, plus snippet export from one site to another.

Limitations

  • Revisions and Testing Mode cost extra. Without them, a snippet edit hits the live site immediately, with no history of earlier versions.
  • Front-end errors don't deactivate. A PHP error on the public side is flagged, but the snippet keeps running.
  • Lots of Pro upsells. Device targeting, scheduling and page scripts show up in the editor with a PRO label.
  • Introductory pricing. The Basic plan costs $99 a year ($49 the first year): the vendor states that renewals are at full price.

The WPCode settings we recommend

All of these exist in the current free version, under Code Snippets > Settings and in each snippet's editor.

SettingRecommended valueWhy
Error Logging
Code Snippets > Settings > Error Handling
OnOff by default; it records each snippet's errors, readable under Code Snippets > Tools > Logs.
Admin Bar Info
Code Snippets > Settings > General Settings
On (default)Shows which snippets load on the current page and a "Snippets With Errors" link.
Headers & Footers mode
Same screen
Off (default)It cuts WPCode down to the three header and footer fields and disables all your custom snippets.
AI & Automation Access
Same screen
Off (default)Turn it on only if an AI tool connected through the WordPress Abilities API should create or edit your snippets.
Delete All Data on Uninstall
Same screen
Off (default)When on, deleting the plugin wipes every snippet for good.
Allow Usage Tracking
Same screen
Per your data policyIt sends the vendor information about your configuration, themes and plugins.
Location of a PHP snippet
Code Snippets > Add Snippet > Insertion
"Admin Only" or "Frontend Only" rather than "Run Everywhere"Code that serves one side of the site has no reason to run on the other.
  • Write down the safe mode URL: /wp-admin/admin.php?page=wpcode&wpcode-safe-mode=1; it stops auto-inserted snippets for you only.
  • Test every new PHP snippet on a staging copy before turning it on in production.
  • Export your snippets from Code Snippets > Tools > Export and keep the file with your backups.
  • If you're locked out, setting the WPCODE_SAFE_MODE constant to true in wp-config.php stops snippets for every visitor: remove it once the snippet is fixed.

WPCode security: a plugin that runs PHP

By design, WPCode runs whatever code you give it: an account that can manage snippets can execute any PHP on the server. In the free version, only administrators can manage snippets; granting rights to other roles requires the Pro plan. The published vulnerabilities are mostly about missing permission checks:

  • CVE-2026-8832, fixed in 2.3.6: an author account could publish a PHP snippet through XML-RPC and get it executed, a remote code execution flaw (CVSS 8.8).
  • CVE-2023-1624, fixed in 2.0.9: a CSRF flaw could trick a user allowed to activate snippets into deleting log files.
  • CVE-2023-0328, fixed in 2.0.7: any account able to edit posts could change or delete the WPCode Library connection key.

Turn on automatic updates for WPCode (see our guide to automatic plugin updates) and keep the number of administrators and authors low, as explained in our article on WordPress roles and capabilities. WP Feint strips references to WPCode's folder and files from your public code, which makes the plugin harder for bots to spot, but it is no substitute for updating.

What WP Feint hides for WPCode

Free version Handled by the free plugin Feint Security

WPCode is one of the 50 most used plugins known to the free version. Pro goes further by renaming its files.

Free version

Nothing to remove

With Pro

  • folder name
  • tag IDs

Still visible

No known trace

Download the free versionHide WPCode with ProSee the 250 camouflaged plugins

WPCode FAQ

Is WPCode the same plugin as Insert Headers and Footers?

Yes. Insert Headers and Footers was renamed WPCode in 2022 and kept the same wordpress.org page. If you only want the old header and footer fields, "Headers & Footers mode" in the settings brings that interface back.

Will I lose my snippets if I change themes?

No: they're stored in the database, independently of the theme. They only go away if you delete the plugin with the data deletion option turned on.

What should I do if a PHP snippet breaks my site?

Open the snippets list with the wpcode-safe-mode=1 parameter, deactivate the faulty snippet, then click "Exit safe mode". If you can't reach the admin, use the WPCODE_SAFE_MODE constant in wp-config.php.

How much does WPCode Pro cost?

The pricing page lists the Basic plan at $99 a year for one site ($49 for the first year), with renewals at full price. Plus (5 sites, $149 a year), Pro (25 sites, with access control, $249 a year) and Bundle (100 sites, $399 a year) work the same way, with a 14-day money-back guarantee.

All camouflaged plugins

Start free, go Pro when you’re ready

The free version already hides WordPress and moves the login page. Pro adds aliases, two-factor authentication and monitoring.