> Prettify Code Syntax wordpress plugin resources analysis

Prettify Code Syntax wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name Prettify Code Syntax
Version 1.2.1
Author Jesús Carrera
Rating 86
Last updated 2013-03-21 07:54:00
Downloads
5061
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: -1%

Post page

Delta: -1%
Prettify Code Syntax plugin has small negative impact on PageSpeed score.

Home page PageSpeed score has been degraded by 1%, while Post page PageSpeed score has been degraded by 1%

Prettify Code Syntax plugin added 59 kB of resources to the Home page and 59 kB of resources to the sample Post page.

Prettify Code Syntax plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! Prettify Code Syntax plugin ads no tables to your Wordpress blog database.

The main reason for the development of this plugin was the lack of options supporting the HTML5 recommendation, where the code snippets should be tagged with pre followed by code, and optionally a class starting with language- and then our language.

You can use the plugin like this:

<pre class="prettyprint"><code class="language-php">
// my code
</code></pre>

Also very important is that although this plugin loads different files depending on your configuration, it fully supports caching scripts (W3 Total Cache) to concatenate and compress all the css and js, so the impact in performance will be minimum.

Languages

This syntax highlighter is based on Google Code Prettify and should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, Javascript, Makefiles, and Rust. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, doesn't work on Smalltalk.

Other languages are supported via an extension (plugin options): CSS, SQL, YAML, Visual Basic, Clojure, Scala, Latek (TeX, LaTeX), WikiText, Erlang, Go, Haskell, Lua, OCAML, SML, F#, Nemerle, Protocol Buffers, CHDL (VHDL), XQ (XQuery), Lisp, Scheme, Dart, Llvm, Mumps, Pascal, R, S, RD, TCL

Styles

Four different styles are provided, and they can be previewed in the plugin options. They are modified to make sure they don't clash with any other styles in your theme.

You have also the option to include your custom style.

If you have a style that would like to see included in the option list, just contact me, or fork me.

Notes

  • Plugin options are at Settings > Prettify Code Syntax. Have a look at the Screenshots tab to see how it looks like.

  • If you don't care too much about the HTML5 recommendation, you can skip the language- class. The code always gets detected automatically.

  • It will also work if you only use a pre tag without the code tag (but long lines will be wrapped instead of get horizontal scroll), or if you only use a code tag with the prettyprint class (but if you don't use pre your spaces/returns won't be maintained.)

  • Be careful using the Visual Editor tab when inserting code, as some HTML tags will be modified or removed.

  • Using a chaching plugin like W3 Total Cache is highly recommended.

Demo

You can find a front end demo here a the bottom.

Resources added by plugin to Home page/Post page in kB
Total size of resources for Home page/Post page in kB
Random Theme Tests
The J A Mortram screenshot

The J A Mortram

by: bigflannel

9479
100%
Acitpo screenshot

Acitpo

by: rogerhub

4912
0%