84% blocksplus

Code Review | BlocksPlus

WordPress plugin BlocksPlus scored 84% from 54 tests.

About plugin

  • Plugin page: blocksplus
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 15, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 27
  • Update frequency: every 22.6 days
  • Top authors: marekonpc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 995 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
This plugin's installer ran successfully

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

Server-side resources used by BlocksPlus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.29 ▼19.09
Dashboard /wp-admin3.38 ▲0.0855.49 ▲6.83
Posts /wp-admin/edit.php3.45 ▲0.0957.27 ▲5.51
Add New Post /wp-admin/post-new.php6.26 ▲0.3898.14 ▲6.03
Media Library /wp-admin/upload.php3.32 ▲0.0950.08 ▲14.78

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 10 new options
New WordPress options
blocksplus_font_sizes
widget_recent-comments
blocksplus_color_palette
db_upgraded
blocksplus_font_sizes_enable
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
blocksplus_color_palette_enable
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for BlocksPlus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,135 ▲33524.23 ▲9.4384.52 ▲82.0936.73 ▼11.22
Dashboard /wp-admin2,372 ▲16611.18 ▲5.30151.40 ▲44.5844.62 ▲2.93
Posts /wp-admin/edit.php2,269 ▲17710.80 ▲8.7692.46 ▲49.9933.40 ▼3.05
Add New Post /wp-admin/post-new.php6,476 ▲4,94220.73 ▼2.36844.45 ▲105.2940.12 ▼8.10
Media Library /wp-admin/upload.php1,636 ▲24811.41 ▲7.18134.18 ▲31.3142.83 ▼1.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • blocksplus_font_sizes_enable
    • blocksplus_font_sizes
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • blocksplus_color_palette
    • blocksplus_color_palette_enable

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocksplus/inc/init.php:24
    • > PHP Warning
      include(): Failed opening 'BLOCKSPLUS_PATHinc/admin-menu-function.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/blocksplus/inc/init.php on line 2
    • > PHP Warning
      include(BLOCKSPLUS_PATHinc/admin-menu-function.php): failed to open stream: No such file or directory in wp-content/plugins/blocksplus/inc/init.php on line 2
    • > PHP Warning
      Use of undefined constant BLOCKSPLUS_PATH - assumed 'BLOCKSPLUS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/blocksplus/inc/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/blocksplus/blocksplus.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocksplus/inc/save-plugin-options.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocksplus/inc/blocksplus-theme-options.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocksplus/inc/styles.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: faq, blocks, image, compare, comparison...

blocksplus/blocksplus.php Passed 13 tests

"BlocksPlus" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
99 characters long description:
A Gutenberg extension plugin, which provides often used blocks with clean and user-friendly design.

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
There were no executable files found in this plugin440 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP65250432
JavaScript6066
CSS2022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-option-page.png38.60KB11.55KB▼ 70.08%