83% escape-html-for-prism-syntax-highlighter

Code Review | Escape HTML For Prism Syntax Highlighter

WordPress plugin Escape HTML For Prism Syntax Highlighter scored83%from 54 tests.

About plugin

  • Plugin page: escape-html-for-p...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.6
  • WordPress version: 6.3.1
  • First release: Oct 10, 2013
  • Latest release: Oct 11, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: satya61229 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.20ms] Passed 4 tests

This is a short check of server-side resources used by Escape HTML For Prism Syntax Highlighter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.14 ▼1.77
Dashboard /wp-admin3.31 ▲0.0144.44 ▼7.99
Posts /wp-admin/edit.php3.36 ▲0.0147.55 ▼5.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.74 ▲2.21
Media Library /wp-admin/upload.php3.23 ▲0.0133.91 ▼1.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Escape HTML For Prism Syntax Highlighter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.29 ▼1.164.78 ▲2.8240.44 ▼2.75
Dashboard /wp-admin2,203 ▲185.91 ▲0.0296.05 ▼6.8039.20 ▼3.16
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0439.62 ▲1.1435.54 ▼0.92
Add New Post /wp-admin/post-new.php1,542 ▼018.45 ▲0.11625.73 ▲0.4856.54 ▼0.91
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0494.36 ▼0.3640.74 ▼1.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/escape-html-for-prism-syntax-highlighter/escape-html-for-prism.php:66

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: You can look at the official readme.txt

escape-html-for-prism-syntax-highlighter/escape-html-for-prism.php 85% from 13 tests

The primary PHP file in "Escape HTML For Prism Syntax Highlighter" version 0.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("escape-html-for-prism-syntax-highlighter.php" instead of "escape-html-for-prism.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin30 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1182230

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin