83% coblocks

Code Review | Page Builder Gutenberg Blocks – CoBlocks

WordPress plugin Page Builder Gutenberg Blocks – CoBlocks scored83%from 54 tests.

About plugin

  • Plugin page: coblocks
  • Plugin version: 3.1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Apr 19, 2018
  • Latest release: Nov 6, 2023
  • Number of updates: 212
  • Update frequency: every 9.6 days
  • Top authors: Godaddy (57.55%)richtabor (36.79%)jrtashjian (2.83%)paranoia1906 (2.36%)olivierlafleur (2.36%)

Code review

54 tests

User reviews

98 reviews

Install metrics

400,000+ active /18,806,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲1.70MB] [CPU: ▲17.75ms] Passed 4 tests

Server-side resources used by Page Builder Gutenberg Blocks – CoBlocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.24 ▲1.7869.85 ▲30.65
Dashboard /wp-admin4.99 ▲1.6864.23 ▲16.62
Posts /wp-admin/edit.php5.04 ▲1.6966.48 ▲19.19
Add New Post /wp-admin/post-new.php8.05 ▲2.16110.79 ▲11.89
Media Library /wp-admin/upload.php4.86 ▲1.6357.25 ▲23.30
Block Patterns /wp-admin/edit.php?post_type=coblocks_pattern4.9053.34

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 792 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
coblocks_layout_selector_controls_enabled
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
coblocks_date_installed
widget_recent-posts
db_upgraded
coblocks_site_design_controls_enabled

Browser metrics Passed 4 tests

Checking browser requirements for Page Builder Gutenberg Blocks – CoBlocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.23 ▼0.012.47 ▲0.7039.32 ▼6.89
Dashboard /wp-admin2,201 ▲245.60 ▲0.0886.47 ▼18.5941.23 ▼1.65
Posts /wp-admin/edit.php2,106 ▲61.94 ▼0.0236.00 ▼0.7831.50 ▼4.74
Add New Post /wp-admin/post-new.php6,347 ▲4,81127.31 ▲9.161,196.21 ▲549.1338.62 ▼27.15
Media Library /wp-admin/upload.php1,471 ▲684.17 ▲0.00104.51 ▲6.9743.95 ▲2.17
Block Patterns /wp-admin/edit.php?post_type=coblocks_pattern1,0701.9337.6329.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • coblocks_site_design_controls_enabled
    • coblocks_layout_selector_controls_enabled
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CoBlocks_Block_Migration' not found in wp-content/plugins/coblocks/includes/block-migrate/class-coblocks-author-migration.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/coblocks/src/blocks/click-to-tweet/index.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'CoBlocks_Block_Migration' not found in wp-content/plugins/coblocks/includes/block-migrate/class-coblocks-alert-migration.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coblocks/src/blocks/counter/index.php:40
    • > PHP Warning
      require_once(COBLOCKS_PLUGIN_DIRincludes/block-migrate/class-coblocks-block-migration-runner.php): failed to open stream: No such file or directory in wp-content/plugins/coblocks/includes/block-migrate/loader.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'COBLOCKS_PLUGIN_DIRincludes/block-migrate/class-coblocks-block-migration-runner.php' (include_path='.:/usr/share/php') in wp-content/plugins/coblocks/includes/block-migrate/loader.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coblocks/src/extensions/layout-selector/index.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coblocks/src/blocks/gist/index.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/coblocks/src/components/gutter-control/gutter-wrapper.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/coblocks/src/components/form-label-colors/label-color-wrapper.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #5 in coblocks/assets to your readme.txt
  • Screenshots: Please add an image for screenshot #4 (Add CoBlocks core blocks to pages)
The official readme.txt might help

coblocks/class-coblocks.php 77% from 13 tests

"Page Builder Gutenberg Blocks – CoBlocks" version 3.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("coblocks.php" instead of "class-coblocks.php")

Code Analysis Passed 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 plugin15,358 lines of code in 534 files:
LanguageFilesBlank linesComment linesLines of code
PHP781,9102,8346,027
JSON138305,721
JavaScript4809113,323
SVG26010277
CSS100010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity28.04
▷ Minimum class complexity1.00
▷ Maximum class complexity365.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes13.85%
Methods218
▷ Static methods219.63%
▷ Public methods16977.52%
▷ Protected methods3917.89%
▷ Private methods104.59%
Functions47
▷ Named functions3165.96%
▷ Anonymous functions1634.04%
Constants30
▷ Global constants826.67%
▷ Class constants2273.33%
▷ Public constants22100.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
6 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/coblocks-labs/site-content.png15.13KB8.72KB▼ 42.33%
dist/images/site-design.0ce62606.png19.30KB10.25KB▼ 46.92%
dist/images/site-content.da68e2d6.png15.13KB8.72KB▼ 42.33%
dist/images/layout-selector.69de142d.png16.33KB9.27KB▼ 43.23%
assets/coblocks-labs/site-design.png19.30KB10.25KB▼ 46.92%