73% code-prettify-syntax-highlighter

Code Review | Code Prettify Syntax Highlighter

WordPress plugin Code Prettify Syntax Highlighter scored73%from 54 tests.

About plugin

  • Plugin page: code-prettify-syn...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Dec 17, 2012
  • Latest release: Dec 17, 2012
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: TrueFalse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,599 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.91MB] [CPU: ▼30.93ms] Passed 4 tests

This is a short check of server-side resources used by Code Prettify Syntax Highlighter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0623.34 ▼17.22
Dashboard /wp-admin3.04 ▼0.2623.67 ▼23.23
Posts /wp-admin/edit.php3.04 ▼0.3224.66 ▼18.28
Add New Post /wp-admin/post-new.php3.04 ▼2.8532.79 ▼63.91
Media Library /wp-admin/upload.php3.04 ▼0.1922.57 ▼18.30

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Code Prettify Syntax Highlighter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13914.05 ▼0.7110.24 ▲8.3243.23 ▼0.19
Dashboard /wp-admin2,209 ▲575.88 ▲0.24101.21 ▼13.4239.13 ▼7.51
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0241.47 ▼0.3736.04 ▼2.40
Add New Post /wp-admin/post-new.php1,535 ▼523.22 ▲0.19591.73 ▼73.6556.70 ▲4.55
Media Library /wp-admin/upload.php1,388 ▼04.27 ▼0.1296.55 ▼7.1143.76 ▲1.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/code-prettify-syntax-highlighter/cpsh.php+56
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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/code-prettify-syntax-highlighter/cpsh.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This frontend.), #2 (This post editing page.)
You can take inspiration from this readme.txt

code-prettify-syntax-highlighter/cpsh.php 85% from 13 tests

The main PHP script in "Code Prettify Syntax Highlighter" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("code-prettify-syntax-highlighter.php" instead of "cpsh.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin173 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142662
PO File1111350
JavaScript20134
CSS12127

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.12MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png37.13KB36.16KB▼ 2.60%
screenshot-2.png37.89KB37.34KB▼ 1.46%
screenshot-3.png47.44KB46.74KB▼ 1.49%