78% blockx

Code Review | BlockX

WordPress plugin BlockX scored78%from 54 tests.

About plugin

  • Plugin page: blockx
  • Plugin version: 1.9.2
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 29, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 64
  • Update frequency: every 17.2 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by BlockX
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.29 ▼1.42
Dashboard /wp-admin3.31 ▲0.0044.60 ▼3.31
Posts /wp-admin/edit.php3.36 ▲0.0046.69 ▲0.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.92 ▲3.01
Media Library /wp-admin/upload.php3.23 ▲0.0033.73 ▼2.22

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 104 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for BlockX
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.141.66 ▼0.0143.28 ▲1.07
Dashboard /wp-admin2,195 ▲185.62 ▼0.0490.90 ▲6.4541.20 ▲1.71
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0240.94 ▲6.3835.83 ▼2.03
Add New Post /wp-admin/post-new.php1,535 ▲618.33 ▼4.61600.38 ▼98.6463.07 ▲8.06
Media Library /wp-admin/upload.php1,400 ▼34.21 ▲0.0295.26 ▼7.0040.66 ▼2.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/blockx/templates/blockx__blockx--debug__editor.php
    • > /wp-content/plugins/blockx/templates/blockx__blockx--authors.php
    • > /wp-content/plugins/blockx/templates/blockx__blockx--authors__editor.php
  • 72× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'authors' of non-object in wp-content/plugins/blockx/templates/blockx__blockx--authors.php on line 17
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/blockx/templates/blockx__blockx--authors.php on line 17
    • > PHP Fatal error
      Uncaught Error: Interface 'Palasthotel\\WordPress\\BlockX\\Containers\\_IContainerType' not found in wp-content/plugins/blockx/classes/Containers/_ContainerType.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Model\\Styles' not found in wp-content/plugins/blockx/classes/Model/ContainerStyles.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Widgets\\_Widget' not found in wp-content/plugins/blockx/classes/Widgets/ListOf.php:8
    • > PHP Warning
      array_map(): Expected parameter 2 to be an array, null given in wp-content/plugins/blockx/templates/blockx__blockx--authors__editor.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Components\\Component' not found in wp-content/plugins/blockx/classes/Gutenberg.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Components\\Component' not found in wp-content/plugins/blockx/classes/Headless.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Components\\Component' not found in wp-content/plugins/blockx/classes/BlockAssetsGenerator.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Palasthotel\\WordPress\\BlockX\\Components\\Component' not found in wp-content/plugins/blockx/classes/Assets.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
4 plugin tags: block, developer, utils, gutenberg

blockx/Plugin.php 92% from 13 tests

"BlockX" version 1.9.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("blockx.php" instead of "Plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,885 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PHP921,1221,0963,666
PO File14865129
JSON50076
CSS10013
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.75
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces6
Traits0
Classes71
▷ Abstract classes912.68%
▷ Concrete classes6287.32%
▷ Final classes00.00%
Methods365
▷ Static methods5314.52%
▷ Public methods35597.26%
▷ Protected methods00.00%
▷ Private methods102.74%
Functions50
▷ Named functions36.00%
▷ Anonymous functions4794.00%
Constants53
▷ Global constants11.89%
▷ Class constants5298.11%
▷ Public constants52100.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