83% enhanced-blocks

Code Review | Enhanced Blocks - Page Builder Blocks for Gutenberg

WordPress plugin Enhanced Blocks - Page Builder Blocks for Gutenberg scored83%from 54 tests.

About plugin

  • Plugin page: enhanced-blocks
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.3
  • WordPress version: 6.3.1
  • First release: Jan 21, 2019
  • Latest release: Sep 23, 2019
  • Number of updates: 17
  • Update frequency: every 14.5 days
  • Top authors: adreastrian (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,077 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.80MB] [CPU: ▼10.13ms] Passed 4 tests

An overview of server-side resources used by Enhanced Blocks - Page Builder Blocks for Gutenberg
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.55 ▲1.0949.98 ▲5.24
Dashboard /wp-admin4.38 ▲1.0356.74 ▼7.50
Posts /wp-admin/edit.php4.49 ▲1.1456.50 ▲5.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0159.13 ▼37.81
Media Library /wp-admin/upload.php4.30 ▲1.0744.33 ▼0.46

Server storage [IO: ▲7.78MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/enhanced-blocks/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Enhanced Blocks - Page Builder Blocks for Gutenberg
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,038 ▲27713.86 ▼0.7710.04 ▲8.2646.41 ▲1.90
Dashboard /wp-admin2,274 ▲745.89 ▲0.06101.37 ▼17.7338.02 ▼8.29
Posts /wp-admin/edit.php2,153 ▲532.04 ▼0.1337.16 ▲0.2736.35 ▼1.32
Add New Post /wp-admin/post-new.php6,233 ▲4,70721.27 ▲3.83920.87 ▲213.9936.72 ▼21.33
Media Library /wp-admin/upload.php1,450 ▲504.19 ▼0.0399.00 ▼17.1641.76 ▼8.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enhanced-blocks/src/social-share.php:188
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enhanced-blocks/src/post-grid.php:17

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

enhanced-blocks/enhanced-blocks.php 92% from 13 tests

This is the main PHP file of "Enhanced Blocks - Page Builder Blocks for Gutenberg" version 1.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 204 characters long)

Code Analysis 95% 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
There were no executable files found in this plugin25,570 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
SVG41128,801
JSON2007,588
PHP65322125,158
CSS171,532603,747
Markdown1520191
JavaScript75785

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,799)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 286)
Cyclomatic complexity
Average complexity per logical line of code1.06
Average class complexity902.00
▷ Minimum class complexity5.00
▷ Maximum class complexity1,799.00
Average method complexity43.90
▷ Minimum method complexity1.00
▷ Maximum method complexity286.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 1.04MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png3.34KB2.25KB▼ 32.63%
admin/img/heading.png2.19KB1.20KB▼ 45.19%
src/assets/img/invers.png44.78KB15.49KB▼ 65.41%
src/assets/img/bg-transparent.png3.01KB2.46KB▼ 18.28%
admin/img/testimonial.png2.53KB1.71KB▼ 32.46%