84% custom-html-block-extension

Code Review | Custom HTML Block Extension

WordPress plugin Custom HTML Block Extension scored84%from 54 tests.

About plugin

  • Plugin page: custom-html-block...
  • Plugin version: 3.4.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: May 8, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 38
  • Update frequency: every 23.7 days
  • Top authors: wildworks (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /16,654 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.35ms] Passed 4 tests

This is a short check of server-side resources used by Custom HTML Block Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.22 ▼0.97
Dashboard /wp-admin3.40 ▲0.0948.52 ▲1.29
Posts /wp-admin/edit.php3.45 ▲0.0947.38 ▲1.84
Add New Post /wp-admin/post-new.php6.09 ▲0.2084.86 ▼11.57
Media Library /wp-admin/upload.php3.32 ▲0.0938.52 ▲4.48
Custom HTML Block Extension /wp-admin/options-general.php?page=custom-html-block-extension3.3133.69

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 530 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom HTML Block Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.32 ▼0.261.77 ▼0.0843.38 ▼3.18
Dashboard /wp-admin2,242 ▲685.77 ▲0.2187.71 ▲1.9637.26 ▼6.10
Posts /wp-admin/edit.php2,150 ▲502.30 ▲0.2647.33 ▲12.6533.77 ▼2.53
Add New Post /wp-admin/post-new.php1,721 ▲19323.57 ▲0.68667.11 ▼23.3636.95 ▼13.45
Media Library /wp-admin/upload.php1,450 ▲534.40 ▲0.21104.39 ▲2.4044.06 ▲0.13
Custom HTML Block Extension /wp-admin/options-general.php?page=custom-html-block-extension1,80616.98583.74108.68

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CHBE_URL - assumed 'CHBE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-html-block-extension/classes/class-settings.php on line 626
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Html_Block_Extension\\add_action() in wp-content/plugins/custom-html-block-extension/classes/class-api.php:17
    • > PHP Warning
      Use of undefined constant CHBE_URL - assumed 'CHBE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-html-block-extension/classes/class-settings.php on line 626
    • > PHP Warning
      Use of undefined constant CHBE_URL - assumed 'CHBE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-html-block-extension/classes/class-settings.php on line 626
    • > PHP Fatal error
      Uncaught Error: Class 'Custom_Html_Block_Extension\\Settings' not found in wp-content/plugins/custom-html-block-extension/classes/class-block-editor.php:17
    • > PHP Warning
      Use of undefined constant CHBE_URL - assumed 'CHBE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-html-block-extension/classes/class-settings.php on line 626
    • > PHP Warning
      Use of undefined constant CHBE_URL - assumed 'CHBE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-html-block-extension/classes/class-settings.php on line 626
    • > PHP Fatal error
      Uncaught Error: Class 'Custom_Html_Block_Extension\\Settings' not found in wp-content/plugins/custom-html-block-extension/classes/class-classic-editor.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Custom_Html_Block_Extension\\Settings' not found in wp-content/plugins/custom-html-block-extension/classes/class-theme-plugin-editor.php:17
    • > PHP Warning
      Use of undefined constant CHBE_URL - assumed 'CHBE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-html-block-extension/classes/class-settings.php on line 626

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: highlighting, emmet, block, gutenberg, html

custom-html-block-extension/custom-html-block-extension.php Passed 13 tests

Analyzing the main PHP file in "Custom HTML Block Extension" version 3.4.0
65 characters long description:
Extend Custom HTML block to evolve into the advanced code editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected47,521 lines of code in 323 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2375,02112,19131,737
JSON470013,639
PHP121522051,206
Sass1517922750
CSS12245189

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods721.21%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin