80% html-block

Code Review | HTML Block

WordPress plugin HTML Block scored80%from 54 tests.

About plugin

  • Plugin page: html-block
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 3
  • Update frequency: every 151.4 days
  • Top authors: sidngr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /840 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.88ms] Passed 4 tests

Server-side resources used by HTML Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.48 ▲2.73
Dashboard /wp-admin3.35 ▲0.0146.52 ▼13.71
Posts /wp-admin/edit.php3.40 ▲0.0549.00 ▲2.29
Add New Post /wp-admin/post-new.php5.99 ▲0.1181.44 ▼19.42
Media Library /wp-admin/upload.php3.28 ▲0.0533.68 ▼0.68
HTML Blocks /wp-admin/edit.php?post_type=html-block3.3234.86
Add New /wp-admin/post-new.php?post_type=html-block5.9878.13

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by HTML Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7614.58 ▲0.241.81 ▲0.1543.82 ▲0.75
Dashboard /wp-admin2,225 ▲515.58 ▲0.0688.04 ▼8.1837.87 ▼0.99
Posts /wp-admin/edit.php2,133 ▲302.03 ▲0.0836.01 ▼6.6935.97 ▼0.73
Add New Post /wp-admin/post-new.php1,552 ▲1723.69 ▼1.60703.71 ▲50.4451.26 ▼10.38
Media Library /wp-admin/upload.php1,430 ▲274.28 ▲0.1596.07 ▼6.4540.80 ▼0.92
HTML Blocks /wp-admin/edit.php?post_type=html-block1,1021.9529.9329.78
Add New /wp-admin/post-new.php?post_type=html-block1,52316.90845.4427.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SN_HB_INIT::uninstall_plugin_data() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: html, block, custom, text

html-block/init.php 92% from 13 tests

The main PHP file in "HTML Block" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("html-block.php" instead of "init.php")

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
Good job! No executable or dangerous file extensions detected146 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23872146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin