84% block-manager

Code Review | Block Manager

WordPress plugin Block Manager scored84%from 54 tests.

About plugin

  • Plugin page: block-manager
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 7, 2020
  • Latest release: Nov 1, 2023
  • Number of updates: 54
  • Update frequency: every 25.8 days
  • Top authors: dcooney (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /39,881 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.80ms] 75% from 4 tests

A check of server-side resources used by Block Manager
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,498.76ms on /wp-admin/options-general.php?page=block-manager)
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.03 ▼2.54
Dashboard /wp-admin3.45 ▲0.1547.54 ▼5.16
Posts /wp-admin/edit.php3.57 ▲0.2147.64 ▼2.76
Add New Post /wp-admin/post-new.php6.01 ▲0.1285.61 ▼4.75
Media Library /wp-admin/upload.php3.38 ▲0.1443.50 ▲7.31
Block Manager /wp-admin/options-general.php?page=block-manager4.211,498.76

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Block Manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.28 ▼0.081.92 ▲0.2543.69 ▼1.02
Dashboard /wp-admin2,200 ▲315.58 ▼0.0583.67 ▼19.5937.08 ▼3.51
Posts /wp-admin/edit.php2,108 ▲82.01 ▲0.0435.10 ▼5.3229.02 ▼8.28
Add New Post /wp-admin/post-new.php1,695 ▲17021.92 ▼1.12666.66 ▼5.7130.94 ▼21.28
Media Library /wp-admin/upload.php1,402 ▲54.21 ▼0.06102.91 ▲1.9341.50 ▼1.06
Block Manager /wp-admin/options-general.php?page=block-manager3,08710.87290.27147.24

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/class-admin.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/api/bulk-process.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/api/category-reset.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/api/blocks-toggle.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/api/export.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/api/category-update.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-manager/api/blocks-reset.php:9

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt might help

block-manager/block-manager.php Passed 13 tests

Analyzing the main PHP file in "Block Manager" version 2.1.1
38 characters long description:
Take control of your WordPress blocks.

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
There were no executable files found in this plugin1,095 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160368887
CSS250125
JavaScript3293580
JSON1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.33
▷ Minimum class complexity14.00
▷ Maximum class complexity21.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1350.00%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions19
▷ Named functions736.84%
▷ Anonymous functions1263.16%
Constants6
▷ Global constants6100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
build/images/icon.2937822d.png2.10KB1.14KB▼ 45.89%