BLACK FRIDAY
Save 59% on PageForge Annual $191/year $485/year
Claim 59% Off →
WP Code Pre icon
Possibly abandoned Tested up to 5.8.17 #6 in Code Highlight

WP Code Pre

This simple plugin was created because of security concerns related to using PHP preg_replace directly. With transition to PHP7, it’s advised to use preg_replace_callback instead.

Active installs10+10+ tier
Downloads · 30d139▼ -7.9% vs prev. 30d
Rating—0 reviews
Health score23/100At risk
All-time downloads2.7KSince Sep 2017
Support resolved—No recent threads
RequiresWP 4.0PHP 7.0+
Downloads · 7d31▼ -11.4% week over week
Our verdict

Consider an alternative

WP Code Pre shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 5 years ago, and scores 23/100 on our health check.

  • Small user base (10+ active installs)
  • Very few reviews so far
  • No update in 5 years
  • Only tested up to WordPress 5.8 (latest is 7.1)

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

258Jul 2Aug 15Sep 29
Yesterday6
Daily average (1y)3
Peak day11Aug 4, 2026
Last 12 months1.2K

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where WP Code Pre stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
Code Highlight >100 1,973 Best Code Highlight plugins →
filter content >100 10,000 Best filter content plugins →

Version adoption

Share of active sites per release.

  • 1.0100.0%

About WP Code Pre

From the official readme · v1.0

Description

This simple plugin was created because of security concerns related to using PHP preg_replace directly. With transition to PHP7, it’s advised to use preg_replace_callback instead.

This plugin uses built-in supported feature of PHP-“highlight_string”. This plugin filters post content inside custom html block for

 

and helps display html and other source code.

To display source code in your posts, surround source code with pre tags. Plugin will filter for pre tags and add inline styles that may be modified using your wordpress theme’s css stylesheet.

For WordPress versions 5.0 and above, HTML pre tags can be used within html block or, classic block. Use the three dot menu to convert to html when there is a invalid content error while post editing.

Installation

  1. Download the plugin
  2. Upload the wp-code-pre.zip folder to your site’s wp-content/plugins directory
  3. Activate the plugin in the WordPress Admin Panel
  4. Surround source code with <pre> </pre> tags, when writing in blog posts using Gutenberg with classic block and “Edit as HTML” or, html block

Changelog

1.0

  • First version of the plugin.

1.0.1

  • Updated readme to reflect updates to version 5.0

Full changelog on WordPress.org →

Screenshots

Code preview on blog post or page
Code preview on blog post or page
Typing code in text tab of WordPress Admin area when writing Post.
Typing code in text tab of WordPress Admin area when writing Post.
Convert block to html while editing to make modifications to existing source code display
Convert block to html while editing to make modifications to existing source code display

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best WP Code Pre alternatives

All Code Highlight plugins →

FAQ

WP Code Pre: quick answers

Straight answers, pulled from live WordPress.org data.

Live data from WordPress.org · checked Sep 30, 2026

Is WP Code Pre free?

Yes. WP Code Pre is free to download and use from the official WordPress.org plugin directory.

Is WP Code Pre safe to use in 2026?

WP Code Pre shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 5 years ago, and scores 23/100 on our health check.

How many websites use WP Code Pre?

WP Code Pre is active on 10+ WordPress websites and has been downloaded 2,680 times since it launched in September 2017. It was downloaded 139 times in the last 30 days.

Does WP Code Pre work with WordPress 7.1?

WP Code Pre is officially tested up to WordPress 5.8.17, while the latest release is 7.1.2. It may still work, but try it on a staging site first.

What PHP version does WP Code Pre need?

WP Code Pre requires PHP 7.0 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was WP Code Pre last updated?

The latest version, 1.0, was released on August 8, 2021 (5 years ago).

Who makes WP Code Pre?

WP Code Pre is developed and maintained by zeshanb.

What are the best alternatives to WP Code Pre?

The most popular alternatives to WP Code Pre are Code Block (200+ installs), WP Code Highlight (200+ installs) and WP Editarea (100+ installs).

Powered by PageForge

Want thousands of pages that rank like these? Build them in an afternoon.

This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.

  • CSV, Google Sheets & API data sources
  • AI content, schema & internal links per page
  • Works with Elementor, Gutenberg, Yoast & Rank Math
  • Free on WordPress.org — no credit card
Sarah is here to help!
Hi there! 👋 Need help finding what you're looking for?
Sarah
Sarah
Online & Ready to Help
Hi there! 👋 Need help finding what you're looking for?

We'll use this to continue our conversation

Just now ✓ Verified

Join 500+ SEO Pros Scaling Their Strategy

Get exclusive programmatic SEO tactics, AI content workflows, and the latest PageForge updates delivered straight to your inbox. Stay ahead of the algorithm.

We care about your data in our privacy policy.