84% syntaxhighlighter

Code Review | SyntaxHighlighter Evolved

WordPress plugin SyntaxHighlighter Evolved scored84%from 54 tests.

About plugin

  • Plugin page: syntaxhighlighter
  • Plugin version: 3.6.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Sep 10, 2007
  • Latest release: Apr 18, 2023
  • Number of updates: 161
  • Update frequency: every 35.4 days
  • Top authors: Viper007Bond (85.71%)renathoc (8.07%)donncha (2.48%)aaronfc (1.86%)merkushin (1.86%)

Code review

54 tests

User reviews

83 reviews

Install metrics

30,000+ active /999,909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▲0.94ms] Passed 4 tests

Analyzing server-side resources used by SyntaxHighlighter Evolved
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3640.44 ▼0.09
Dashboard /wp-admin3.65 ▲0.3449.13 ▼0.58
Posts /wp-admin/edit.php3.76 ▲0.4051.17 ▲3.09
Add New Post /wp-admin/post-new.php6.23 ▲0.3496.68 ▲9.44
Media Library /wp-admin/upload.php3.57 ▲0.3337.19 ▲1.34
SyntaxHighlighter /wp-admin/options-general.php?page=syntaxhighlighter3.5434.33

Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 108 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SyntaxHighlighter Evolved
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.55 ▼1.101.75 ▼0.3941.84 ▼5.75
Dashboard /wp-admin2,207 ▲195.85 ▲0.97104.28 ▼16.0942.19 ▼1.60
Posts /wp-admin/edit.php2,093 ▲252.06 ▲0.0140.17 ▲3.6335.42 ▲1.81
Add New Post /wp-admin/post-new.php6,363 ▲4,84927.64 ▲10.15945.52 ▲246.5246.11 ▼12.06
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.0296.52 ▼4.7041.69 ▼6.87
SyntaxHighlighter /wp-admin/options-general.php?page=syntaxhighlighter1,5912.2353.5045.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/syntaxhighlighter/syntaxhighlighter.php:1847

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: highlighting, code, sourcecode, source, wordpresscom...

syntaxhighlighter/syntaxhighlighter.php 92% from 13 tests

The main file in "SyntaxHighlighter Evolved" v. 3.6.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 220 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin8,391 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
CSS262516284,506
JavaScript684461,4582,584
PHP12772731,301

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity191.00
▷ Minimum class complexity191.00
▷ Maximum class complexity191.00
Average method complexity6.28
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
syntaxhighlighter2/styles/magnifier.png0.55KB0.60KB0.00%
syntaxhighlighter2/styles/help.png0.72KB0.82KB0.00%
syntaxhighlighter2/styles/printer.png0.66KB0.77KB0.00%
syntaxhighlighter2/styles/page_white_code.png0.54KB0.59KB0.00%
syntaxhighlighter2/styles/page_white_copy.png0.25KB0.34KB0.00%