84% advanced-blocks

Code Review | Advanced Blocks - WordPress Page Building Blocks

WordPress plugin Advanced Blocks - WordPress Page Building Blocks scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-blocks
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 5.9.2
  • First release: May 23, 2019
  • Latest release: Aug 12, 2020
  • Number of updates: 21
  • Update frequency: every 21.3 days
  • Top authors: B-07 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,876 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.81MB] [CPU: ▼333.41ms] Passed 4 tests

Server-side resources used by Advanced Blocks - WordPress Page Building Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1757.73 ▼5.91
Dashboard /wp-admin3.51 ▲0.1165.44 ▲26.82
Posts /wp-admin/edit.php3.74 ▲0.1055.03 ▲16.34
Add New Post /wp-admin/post-new.php3.34 ▼3.6329.92 ▼1,343.10
Media Library /wp-admin/upload.php5.52 ▲2.2329.70 ▼0.97
advanced Blocks /wp-admin/admin.php?page=advanced-blocks-welcome5.5226.50
advanced Blocks /wp-admin/options-general.php?page=advanced-blocks5.5227.40

Server storage [IO: ▲6.05MB] [DB: ▲0.34MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 153 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Blocks - WordPress Page Building Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲4016.03 ▲0.397.57 ▲1.042.33 ▼0.30
Dashboard /wp-admin2,894 ▲366.12 ▼0.03118.80 ▼33.53165.32 ▼2.10
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0082.36 ▲17.46144.45 ▼77.26
Add New Post /wp-admin/post-new.php1,688 ▼2221.89 ▲1.07520.10 ▲68.67182.89 ▼15.77
Media Library /wp-admin/upload.php1,703 ▲85.55 ▲0.00158.73 ▲10.90196.54 ▼42.62
advanced Blocks /wp-admin/admin.php?page=advanced-blocks-welcome1,0012.3955.15146.02
advanced Blocks /wp-admin/options-general.php?page=advanced-blocks1,2378.37308.94137.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • advanced-blocks-list

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-blocks/languages/js-strings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-blocks/settings/class-advanced-blocks-settings.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-blocks/settings/class-advanced-blocks-api.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in advanced-blocks/assets to your readme.txt
You can look at the official readme.txt

advanced-blocks/plugin.php 92% from 13 tests

The main PHP script in "Advanced Blocks - WordPress Page Building Blocks" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-blocks.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin34,479 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1368.42%
▷ Anonymous functions631.58%
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings