84% booster-blocks

Code Review | Booster Blocks

WordPress plugin Booster Blocks scored84%from 54 tests.

About plugin

  • Plugin page: booster-blocks
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2022
  • Latest release: Mar 28, 2022
  • Number of updates: 7
  • Update frequency: every 7.4 days
  • Top authors: wpvibes (85.71%)anand.au14 (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /386 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Booster Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.64 ▼2.79
Dashboard /wp-admin3.34 ▲0.0445.00 ▼5.58
Posts /wp-admin/edit.php3.45 ▲0.1048.15 ▼2.59
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.62 ▼7.99
Media Library /wp-admin/upload.php3.26 ▲0.0335.56 ▲2.36

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Booster Blocks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼0.995.71 ▲3.9743.66 ▲4.76
Dashboard /wp-admin2,203 ▲175.81 ▼0.1196.24 ▼9.9738.42 ▼4.96
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0239.81 ▲6.7235.53 ▲0.11
Add New Post /wp-admin/post-new.php6,185 ▲4,65219.56 ▼3.58946.23 ▲275.5638.36 ▼9.30
Media Library /wp-admin/upload.php1,388 ▼34.17 ▲0.0197.51 ▼3.4443.71 ▼1.19

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BoosterBlocks\\add_action() in wp-content/plugins/booster-blocks/includes/register-blocks.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BoosterBlocks\\add_action() in wp-content/plugins/booster-blocks/includes/block-assets.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: gutenberg blocks, editor, blocks

booster-blocks/init.php 85% from 13 tests

The principal PHP file in "Booster Blocks" v. 0.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("booster-blocks.php" instead of "init.php")

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
No dangerous file extensions were detected523 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS4278344
PHP55050162
JavaScript32017

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.25
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG files were detected