10% master-blocks

Code Review | Master Blocks - Gutenberg Site Builder

WordPress plugin Master Blocks - Gutenberg Site Builder scored 10% from 54 tests.

About plugin

  • Plugin page: master-blocks
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Dec 6, 2018
  • Latest release: Dec 10, 2018
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: masterblocks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,527 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/master-blocks/freemius/includes/class-freemius.php+9375
    Trying to get property 'is_premium' of non-object

Server metrics [RAM: ▲0.51MB] [CPU: ▼291.18ms] Passed 4 tests

A check of server-side resources used by Master Blocks - Gutenberg Site Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.5658.67 ▲3.67
Dashboard /wp-admin3.92 ▲0.5136.76 ▲2.25
Posts /wp-admin/edit.php4.15 ▲0.5143.35 ▲4.72
Add New Post /wp-admin/post-new.php7.41 ▲0.44100.60 ▼1,173.66
Media Library /wp-admin/upload.php3.87 ▲0.5727.43 ▲3.02
Freemius Debug [v.2.2.2] /wp-admin/admin.php?page=freemius4.2125.18

Server storage [IO: ▲5.90MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 254 new files
Database: no new tables, 5 new options
New WordPress options
fs_gdpr
fs_debug_mode
fs_api_cache
fs_accounts
fs_active_plugins

Browser metrics Passed 4 tests

Checking browser requirements for Master Blocks - Gutenberg Site Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,112 ▲37017.98 ▲2.0122.55 ▲15.834.50 ▲2.31
Dashboard /wp-admin2,956 ▲956.16 ▼0.00118.91 ▼18.65194.39 ▲28.90
Posts /wp-admin/edit.php2,753 ▲623.12 ▼0.2467.51 ▲2.37162.40 ▲15.31
Add New Post /wp-admin/post-new.php1,974 ▲27825.67 ▲4.21471.53 ▲24.65208.36 ▲45.35
Media Library /wp-admin/upload.php1,834 ▲1365.56 ▲0.08123.45 ▼15.43225.27 ▲39.68
Freemius Debug [v.2.2.2] /wp-admin/admin.php?page=freemius1,4762.4253.06125.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 5 options in the database
    • fs_debug_mode
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts
    • fs_api_cache

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/master-blocks/freemius/templates/ajax-loader.php
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/master-blocks/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/master-blocks/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/master-blocks/master-blocks-template.php:7
    • > PHP Warning
      Use of undefined constant PLUGIN_SLUG - assumed 'PLUGIN_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/master-blocks/core/Enqueue.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Master_Blocks\\core\\Plugin' not found in wp-content/plugins/master-blocks/core/Constants.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/master-blocks/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/master-blocks/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/master-blocks/freemius/templates/partials/network-activation.php:6
    • > PHP Warning
      Use of undefined constant PLUGIN_SLUG - assumed 'PLUGIN_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/master-blocks/core/Enqueue.php on line 9
    • > PHP Warning
      Use of undefined constant PLUGIN_SLUG - assumed 'PLUGIN_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/master-blocks/core/Enqueue.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Invalid version format
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

master-blocks/master-blocks.php Passed 13 tests

This is the main PHP file of "Master Blocks - Gutenberg Site Builder" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
Next generation site builder for WordPress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected35,528 lines of code in 202 files:
LanguageFilesBlank linesComment linesLines of code
PHP1216,55814,43128,174
JavaScript161,7581,3696,316
CSS1811731672
Markdown1610192
SVG4521136
JSON10038

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,315)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity57.70
▷ Minimum class complexity1.00
▷ Maximum class complexity2,315.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes60
▷ Abstract classes35.00%
▷ Concrete classes5795.00%
▷ Final classes11.75%
Methods1,106
▷ Static methods16514.92%
▷ Public methods78671.07%
▷ Protected methods151.36%
▷ Private methods30527.58%
Functions130
▷ Named functions12999.23%
▷ Anonymous functions10.77%
Constants149
▷ Global constants11778.52%
▷ Class constants3221.48%
▷ Public constants32100.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
5 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/master-blocks.png6.91KB3.22KB▼ 53.31%
sample/images/phone.png26.40KB26.38KB0.07%
sample/images/phone2.png29.34KB29.33KB0.03%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%