84% html-editor-syntax-highlighter

Code Review | HTML Editor Syntax Highlighter

WordPress plugin HTML Editor Syntax Highlighter scored84%from 54 tests.

About plugin

  • Plugin page: html-editor-synta...
  • Plugin version: 2.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 18, 2012
  • Latest release: Jan 16, 2023
  • Number of updates: 130
  • Update frequency: every 30.2 days
  • Top authors: nixdns (64.62%)arniebradfo (36.15%)

Code review

54 tests

User reviews

109 reviews

Install metrics

60,000+ active /541,641 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲7.61ms] Passed 4 tests

An overview of server-side resources used by HTML Editor Syntax Highlighter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.15 ▼0.93
Dashboard /wp-admin3.39 ▲0.0559.43 ▼1.41
Posts /wp-admin/edit.php3.50 ▲0.1560.21 ▲17.06
Add New Post /wp-admin/post-new.php5.99 ▲0.11106.42 ▲15.91
Media Library /wp-admin/upload.php3.31 ▲0.0949.86 ▲16.85

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for HTML Editor Syntax Highlighter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.32 ▼1.074.60 ▲2.6948.12 ▲3.46
Dashboard /wp-admin2,206 ▲144.81 ▼0.12107.46 ▼1.2343.70 ▲4.13
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0140.70 ▲5.2335.89 ▼3.95
Add New Post /wp-admin/post-new.php2,269 ▲75518.55 ▲0.94670.42 ▼25.5948.55 ▼5.33
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0295.00 ▼6.3043.79 ▼1.13

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/html-editor-syntax-highlighter/html-editor-syntax-highlighter.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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:
  • Screenshots: Add descriptions for screenshots #6, #7 in html-editor-syntax-highlighter/assets to your readme.txt
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

html-editor-syntax-highlighter/html-editor-syntax-highlighter.php Passed 13 tests

The main file in "HTML Editor Syntax Highlighter" v. 2.4.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
77 characters long description:
Add syntax highlighting to the all WordPress code editors using Codemirror.js

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 plugin6,788 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS11,86706,322
PHP14263465
JavaScript1001

PHP code Passed 2 tests

Analyzing 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.32
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods541.67%
▷ Protected methods00.00%
▷ Private methods758.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin