89% code-highlighter-block

Code Review | Code Highlighter Block - Syntax Highlighter Gutenberg Block

WordPress plugin Code Highlighter Block - Syntax Highlighter Gutenberg Block scored89%from 54 tests.

About plugin

  • Plugin page: code-highlighter-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2020
  • Latest release: Nov 26, 2020
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: webackstop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /485 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.79ms] Passed 4 tests

Analyzing server-side resources used by Code Highlighter Block - Syntax Highlighter Gutenberg Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.54 ▲8.05
Dashboard /wp-admin3.32 ▼0.0347.99 ▼16.90
Posts /wp-admin/edit.php3.37 ▲0.0152.49 ▲7.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.03 ▼11.16
Media Library /wp-admin/upload.php3.24 ▲0.0136.03 ▼2.28
Code Block /wp-admin/tools.php?page=chb_help3.2029.30

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Code Highlighter Block - Syntax Highlighter Gutenberg Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6515.19 ▲0.6325.40 ▲23.7842.60 ▲1.23
Dashboard /wp-admin2,225 ▲194.85 ▼0.19112.40 ▲7.5542.74 ▲0.94
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0441.16 ▲2.9637.60 ▲4.96
Add New Post /wp-admin/post-new.php6,200 ▲4,65919.31 ▼3.88928.33 ▲235.8954.77 ▼1.51
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.03102.22 ▲1.1941.08 ▼3.39
Code Block /wp-admin/tools.php?page=chb_help8502.0121.3631.64

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Stable tag: No value
  • Donate link: Invalid URI ("")
  • Screenshots: Please add descriptions for these screenshots #1, #2 in code-highlighter-block/assets to your readme.txt
You can take inspiration from this readme.txt

code-highlighter-block/plugin.php 85% from 13 tests

This is the main PHP file of "Code Highlighter Block - Syntax Highlighter Gutenberg Block" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("code-highlighter-block.php" instead of "plugin.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected1,164 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS39631834
JavaScript4619171
PHP22471126
Sass31029
INI1004

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.20
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%
Functions7
▷ Named functions7100.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
PNG images were not found in this plugin