79% multipurpose-block

Code Review | Multipurpose Gutenberg Block

WordPress plugin Multipurpose Gutenberg Block scored79%from 54 tests.

About plugin

  • Plugin page: multipurpose-block
  • Plugin version: 1.7.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2019
  • Latest release: Jul 24, 2023
  • Number of updates: 55
  • Update frequency: every 29.9 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /7,801 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲5.00MB] [CPU: ▲14.71ms] 75% from 4 tests

Server-side resources used by Multipurpose Gutenberg Block
Please fix the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.00MB on /wp-admin/admin.php?page=multipurpose-block)
PageMemory (MB)CPU Time (ms)
Home /8.85 ▲5.3867.74 ▲24.66
Dashboard /wp-admin8.87 ▲5.5673.58 ▲20.73
Posts /wp-admin/edit.php8.87 ▲5.5176.80 ▲21.99
Add New Post /wp-admin/post-new.php9.45 ▲3.5698.53 ▼8.54
Media Library /wp-admin/upload.php8.87 ▲5.6488.42 ▲50.00
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8761.18
Multipurpose Gutenberg Block /wp-admin/admin.php?page=multipurpose-block8.8767.93

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 188 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
fs_debug_mode
fs_active_plugins
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
fs_accounts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Multipurpose Gutenberg Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.35 ▲0.041.70 ▲0.1431.01 ▼8.62
Dashboard /wp-admin2,215 ▲385.60 ▼0.0883.76 ▼5.9244.68 ▼1.58
Posts /wp-admin/edit.php2,121 ▲212.02 ▼0.0340.76 ▼2.0538.65 ▲2.57
Add New Post /wp-admin/post-new.php6,369 ▲4,82127.84 ▲4.41953.61 ▲323.8473.92 ▲20.20
Media Library /wp-admin/upload.php1,417 ▲264.23 ▲0.04111.02 ▲4.9550.00 ▲3.91
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0692.2023.8727.99
Multipurpose Gutenberg Block /wp-admin/admin.php?page=multipurpose-block9791.7231.4765.57

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
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/multipurpose-block/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • fs_accounts
    • fs_debug_mode

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: block, gutenberg blocks, blocks, block-editor, gutenberg

multipurpose-block/index.php 85% from 13 tests

The main PHP file in "Multipurpose Gutenberg Block" ver. 1.7.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multipurpose-block.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 299 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin38,265 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP1187,97517,22932,990
JSON2004,802
JavaScript54795299
CSS152022174

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity93.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,259
▷ Static methods19715.65%
▷ Public methods87069.10%
▷ Protected methods171.35%
▷ Private methods37229.55%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
images/padding_top.png1.04KB0.24KB▼ 76.57%
images/icons.png4.22KB2.04KB▼ 51.72%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%