PHPackages                             kasparsd/code-prettify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kasparsd/code-prettify

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

kasparsd/code-prettify
======================

Automatic code syntax highlighter

1.5.1(4y ago)99421[5 issues](https://github.com/kasparsd/code-prettify/issues)GPL-2.0-or-laterJavaScript

Since Apr 19Pushed 3y ago3 watchersCompare

[ Source](https://github.com/kasparsd/code-prettify)[ Packagist](https://packagist.org/packages/kasparsd/code-prettify)[ RSS](/packages/kasparsd-code-prettify/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (6)Dependencies (3)Versions (3)Used By (0)

Code Prettify
=============

[](#code-prettify)

Contributors: kasparsd
Tags: code, pre, highlighting, highlight, highlighter, syntax, syntax highlighting, prettify
Requires at least: 3.0
Tested up to: 6.1
Stable tag: 1.5.1

100% automatic code highlighting using the Prettify library. No shortcodes, no classnames, fully automatic and pure awesome.

Description
-----------

[](#description)

Uses a customized version of the [Code Prettify library](https://github.com/kasparsd/code-prettify-lib/pull/1) to support local styles and scripts. Plugin applies code highlighting automatically to all `` tags on the page.

**Compatible with Gutenberg and doesn't lock you in with specific markup requirements.**

### Development

[](#development)

Plugin development [on GitHub](https://github.com/kasparsd/code-prettify).

### Credits

[](#credits)

Created and maintained by [Kaspars Dambis](https://kaspars.net). All of my open source work is available [on GitHub](https://github.com/kasparsd).

Use Contact Form 7? [Storage for Contact Form 7](http://preseto.com/go/cf7-storage) is my commercial plugin (GPL license) for storing all form submissions in your WordPress database.

Cover photo by [Yuri Samoilov](https://www.flickr.com/photos/110751683@N02/13334080323/)

Installation
------------

[](#installation)

Simply upload the plugin and active it. It works out of the box and doesn't have any configuration options.

Frequently Asked Questions
--------------------------

[](#frequently-asked-questions)

None, yet.

Screenshots
-----------

[](#screenshots)

1. Syntax highlighting applied to a `` block and inline `` segments.

Changelog
---------

[](#changelog)

### 1.5.1 (November 8, 2021)

[](#151-november-8-2021)

- Fix the deprecation notice for how the data is passed to the script.
- Mark as tested with WordPress 5.8.

### 1.5.0 (April 19, 2020)

[](#150-april-19-2020)

- Preload the `prettify.css` file for performance improvements.
- Add WordPress coding standards checks.
- Add support for Composer install.

### 1.4.2 (January 14, 2019)

[](#142-january-14-2019)

- Switch to legacy PHP array syntax for better compatibility.

### 1.4.1 (December 21, 2018)

[](#141-december-21-2018)

- Add a trailing semicolon to all JS files to support concatenation.

### 1.4.0 (December 20, 2018)

[](#140-december-20-2018)

- Update the Prettify library.
- Don't highlight standalone `` blocks without the `` wrapper.
- Mark as tested with WordPress 5.0.

### 1.3.4

[](#134)

- Update the Prettify library.
- Ensure that Prettify styles are applied to the contents of `` and `` elements.

### 1.3.3

[](#133)

- Update the Prettify library.
- Highlight `` blocks too.

### 1.0

[](#10)

- Initial release.

Upgrade Notice
--------------

[](#upgrade-notice)

### 1.0

[](#10-1)

Initial release.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~568 days

Total

2

Last Release

1652d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?d=identicon)[kasparsd](/maintainers/kasparsd)

---

Top Contributors

[![kasparsd](https://avatars.githubusercontent.com/u/169055?v=4)](https://github.com/kasparsd "kasparsd (130 commits)")

---

Tags

bloggingcomposer-packageprettify-librarysyntax-highlightingwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/kasparsd-code-prettify/health.svg)

```
[![Health](https://phpackages.com/badges/kasparsd-code-prettify/health.svg)](https://phpackages.com/packages/kasparsd-code-prettify)
```

###  Alternatives

[braincrafted/background-process

Start processes in the background that continue running when the PHP process exists.

2976.1k1](/packages/braincrafted-background-process)[ammont/finglify

Translates farsi/persian to finglish/pinglish.

385.3k](/packages/ammont-finglify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
