BLACK FRIDAY
Save 59% on PageForge Annual $191/year $485/year
Claim 59% Off →
Code Revisions icon
Possibly abandoned Tested up to 3.7.41

Code Revisions

This plugin will help you to keep track of changes made to theme and plugin files through the WordPress code editors. You no longer need to worry about possibly breaking something with bad changes because you can always…

Active installs10+10+ tier
Downloads · 30d49▲ +22.5% vs prev. 30d
Rating4.2/56 reviews
Health score32/100At risk
All-time downloads4.5KSince Aug 2013
Support resolved—No recent threads
RequiresWP 3.6PHP any
Downloads · 7d11▲ +10% week over week
Our verdict

Consider an alternative

Code Revisions shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites, is rated 4.2/5 and was last updated 13 years ago, and scores 32/100 on our health check.

  • Small user base (10+ active installs)
  • No update in 13 years
  • Only tested up to WordPress 3.7 (latest is 7.1)

How does it stack up?

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

Daily downloads

123Jul 23Sep 5Oct 20
Yesterday0
Daily average (1y)1
Peak day8Apr 19, 2026
Last 12 months435

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

Rankings

Where Code Revisions stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
code >100 10,000 Best code plugins →
Editors >100 10,000 Best Editors plugins →
revision.php #3 3 Best revision.php plugins →
revisions >100 1,628 Best revisions plugins →
theme >100 10,000 Best theme plugins →

Version adoption

Share of active sites per release.

  • 1.0100.0%

Rating breakdown

★★★★★★★★★★ 4.2 from 6 reviews

  • 5★66.7%
  • 4★16.7%
  • 3★0.00%
  • 2★0.00%
  • 1★16.7%

About Code Revisions

From the official readme · v1.0

Description

This plugin will help you to keep track of changes made to theme and plugin files through the WordPress code editors. You no longer need to worry about possibly breaking something with bad changes because you can always return to an older version of the file. Additionally the plugin helps you to redo your changes when they might have been overwritten by a plugin update by easily showing you what changed. The revisions are handled in a way native to WordPress. Comfortably view revisions using the new revision viewer introduced in WordPress 3.6.

This plugin is part of my Google Summer of Code 2013 project at WordPress. You can find more information on make/core. It was also featured on wptavern.com if you are interested in some background information.

Developer’s Guide

code-revisions.php: The main plugin file. It defines constants, loads the other files, instantiates the classes if appropriate and contains the uninstall automatism.

inc/class-code-revisions.php: Loaded on all pages this class does multiple general things. It adds the custom post type required for saving the code revisions (post_type()) and redirects the user from the post editor (wp-admin/edit.php) to the appropriate code editor (wp-admin/theme-editor.php or wp-admin/plugin-editor.php) when he tries to view those posts directly (redirect()). Further more this class hooks into the WordPress revision restore process to not only restore the post but also the related file (restore()) and handles styling the WordPress revision viewer (wp-admin/revisions.php) when viewing code revisions so it feels more code-editor-ish (styles()).

inc/code-revisions-editors.php: This file contains the Code_Revisions_Editors class which, in contrast to the Code_Revisions class in class-code-revisions.php, is only loaded on the WordPress code editor pages using the load-plugin-editor.php and load-theme-editor.php hooks. Using either, if available, POST and GET data or falling back to the appropriate default file the class generates an array containing meta information on the currently viewed file (generate_meta()). In an attempt to have as less theme or plugin file specific code this array contains 4 strings:

  • type: ‘plugin’/’theme’
  • package: theme slug or ‘plugin/plugin.php’
  • file: relative file path from the theme’s folder or the WordPress plugin directory
  • checksum: md5-checksum of the file

Using this data the plugin can check the database for a related post and retrieve it’s id if available (retrieve()). The meta information array is stored as custom post meta data alongside a file’s post.

When a file is opened in the editor and a related post is found in the database the plugin checks if the post’s content and the file’s content still match. If they don’t the post is updated with the new content (which results in a new revision) and the user is notified about the change using an admin notice (handle_direct_changes()).

On file updates through the code editor the plugin checks if the file has actually changed before WordPress writes to it. Only when changes are found a revision needs to be created. If no post is associated with the file yet a new post is created with the old contents. This post is then updated with the new content. This process guarantees that there is a revision with the initial file content to which the user can revert to (handle_file_update()). Additionally the plugin tries to do a syntax check for *.php files to prevent breaking the WordPress installation (check_syntax()). As mostly recommended the plugin utilizes php -l for this by writing the new contents to a temporary file. If this feature is not available a more basic check using eval is performed. When a syntax error is found the actual file is not written, but the user is redirected back to the editor with a notification about the error and it’s location with line highlighting.

inc/plugged.php: Contains a slightly changed version of the pluggable wp_text_diff() function. wp_text_diff() is utilized for generating the diffs rendered in the revision viewer. Normally it strips leading, trailing and multiple successive whitespaces. However this behavior is not very helpful when viewing code revisions, wherefore the plugin suppresses it for revisions associated with the custom code revisions post type.

inc/metabox.php: The template for the revision metabox.

js/editors.js: JavaScript for customizing the code editor pages (wp-admin/plugin-editor.php and wp-admin/theme-editor.php). It adds the revisions metabox below the editors, the revisions text with link next to the ‘Update File’ button and handles the text replacement and line highlighting when a syntax error was found.

css/editors.css: Styles for the code editors. Enqueued in inc/class-code-revisions-editors.php -> scripts().

css/viewer.css: Styles for the revision viewer (wp-admin/revisions.php). Enqueued only when viewing code revisions in inc/class-code-revisions.php -> styles().

Changelog

0.1

  • Post and revision creation on file edits

0.2

  • Revision list metabox and revision viewing

0.3

  • Revision restoring

0.4

  • Take direct file changes (e.g. ftp or plugin/theme updates) into account

0.5

  • Basic php syntax checking

0.6

  • Enhanced error proofing & revision browsing

Full changelog on WordPress.org →

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 Code Revisions alternatives

All code plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager WPCode Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code… by Syed Balkhi 3M+ ★★★★★★★★★★ 4.9 (1.9K) 2 weeks ago 95
2 Code Snippets Code Snippets Manage custom WordPress code in one dashboard. Create PHP and HTML snippets, preview code… by Code Snippets Pro 1M+ ★★★★★★★★★★ 4.7 (509) 23 hours ago 95
3 Head & Footer Code Head & Footer Code Easy add site-wide, category and article specific custom code before the closing and , or… by Aleksandar Urošević 100K+ ★★★★★★★★★★ 5 (51) 2 months ago 77
4 Simple Custom CSS Plugin Simple Custom CSS Plugin Add Custom CSS to your WordPress site without any hassles. by John Regan 100K+ ★★★★★★★★★★ 4.7 (159) 2 years ago 51
5 Shortcoder — Create Shortcodes for Anything Shortcoder — Create Shortcodes for Anything Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the… by vaakash 100K+ ★★★★★★★★★★ 4.9 (227) 1 month ago 77
6 Scripts n Styles Scripts n Styles This plugin allows Admin users to individually add HTML, custom CSS, Classes and JavaScript… by WraithKenny 30K+ ★★★★★★★★★★ 4.4 (30) 3 years ago 45
7 SyntaxHighlighter Evolved SyntaxHighlighter Evolved Easily post syntax-highlighted code to your site without having to modify the code at all… by Alex Mills 20K+ ★★★★★★★★★★ 4.3 (86) 2 years ago 51
8 Code Embed Code Embed Code Embed provides a very easy and efficient way to embed code (JavaScript, CSS and HTML)… by David Artiss 10K+ ★★★★★★★★★★ 4.4 (45) 2 months ago 83
9 WP Coder – Insert & Manage Code Snippets WP Coder – Insert & Manage Code Snippets Snippets made simple — easily insert and manage custom PHP, CSS, JS & HTML without coding… by Wow-Company 10K+ ★★★★★★★★★★ 4.9 (32) 3 weeks ago 85
10 Advance Custom HTML – Show Off Code Snippets with Live Preview Advance Custom HTML Display HTML, CSS, JavaScript, PHP & Python code snippets in WordPress with live preview… by bPlugins 10K+ ★★★★★★★★★★ 2.5 (4) 4 days ago 73

FAQ

Code Revisions: quick answers

Straight answers, pulled from live WordPress.org data.

Live data from WordPress.org · checked Oct 21, 2026

Is Code Revisions free?

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

Is Code Revisions safe to use in 2026?

Code Revisions shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites, is rated 4.2/5 and was last updated 13 years ago, and scores 32/100 on our health check.

How many websites use Code Revisions?

Code Revisions is active on 10+ WordPress websites and has been downloaded 4,516 times since it launched in August 2013. It was downloaded 49 times in the last 30 days.

Does Code Revisions work with WordPress 7.1?

Code Revisions is officially tested up to WordPress 3.7.41, while the latest release is 7.1.3. It may still work, but try it on a staging site first.

When was Code Revisions last updated?

The latest version, 1.0, was released on September 30, 2013 (13 years ago).

Who makes Code Revisions?

Code Revisions is developed and maintained by Alex.

What are the best alternatives to Code Revisions?

The most popular alternatives to Code Revisions are WPCode (3M+ installs), Code Snippets (1M+ installs) and Head & Footer Code (100K+ 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.