61% ultimate-blocks

Code Review | Ultimate Blocks - WordPress Blocks Plugin

WordPress plugin Ultimate Blocks - WordPress Blocks Plugin scored61%from 54 tests.

About plugin

  • Plugin page: ultimate-blocks
  • Plugin version: 3.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2018
  • Latest release: Nov 16, 2023
  • Number of updates: 183
  • Update frequency: every 11.4 days
  • Top authors: imtiazrayhan (100%)

Code review

54 tests

User reviews

609 reviews

Install metrics

50,000+ active /1,027,822 total downloads

Benchmarks

Plugin footprint 64% 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: ▲6.79MB] [CPU: ▲74.30ms] 50% from 4 tests

An overview of server-side resources used by Ultimate Blocks - WordPress Blocks Plugin
Please have a look at the following items
  • RAM: Total memory usage should be kept under 10MB (currently 10.34MB on /wp-admin/admin.php?page=ultimate-blocks-help)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 6.79MB on /wp-admin/admin.php?page=ultimate-blocks-help)
PageMemory (MB)CPU Time (ms)
Home /13.26 ▲9.79110.62 ▲71.41
Dashboard /wp-admin10.34 ▲7.04117.35 ▲69.43
Posts /wp-admin/edit.php10.34 ▲6.98128.77 ▲82.72
Add New Post /wp-admin/post-new.php11.91 ▲6.03160.78 ▲73.62
Media Library /wp-admin/upload.php10.34 ▲7.11134.59 ▲103.48
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius10.34105.43
Help /wp-admin/admin.php?page=ultimate-blocks-help10.3495.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 554 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
UltimateBlocks_installDate
ultimate_blocks_css_version
fs_active_plugins
db_upgraded
theysaidso_admin_options
fs_accounts
can_compress_scripts
UltimateBlocks_review_notify
...

Browser metrics Passed 4 tests

Ultimate Blocks - WordPress Blocks Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6114.70 ▲0.271.60 ▼0.2731.74 ▼12.57
Dashboard /wp-admin2,239 ▲595.57 ▼0.0699.14 ▲11.4764.63 ▲24.77
Posts /wp-admin/edit.php2,160 ▲601.94 ▼0.1839.62 ▲2.6738.18 ▲0.37
Add New Post /wp-admin/post-new.php1,724 ▲19832.72 ▲9.77849.49 ▲210.0688.49 ▲34.10
Media Library /wp-admin/upload.php1,447 ▲474.19 ▼0.0299.92 ▼5.3875.78 ▲31.69
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1111.6529.1429.45
Help /wp-admin/admin.php?page=ultimate-blocks-help1,4758.92297.1599.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ultimate-blocks/library/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • fs_debug_mode
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_active_plugins
    • UltimateBlocks_review_notify
    • db_upgraded
    • fs_accounts

Smoke tests 25% 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)
Good news, no errors were detected

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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/ultimate-blocks/admin/templates/menus/main-menu.php
    • > /wp-content/plugins/ultimate-blocks/admin/partials/ultimate-blocks-admin-display.php
    • > /wp-content/plugins/ultimate-blocks/public/partials/ultimate-blocks-public-display.php
  • 83× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-blocks/src/blocks/review/block.php:198
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/ultimate-blocks/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-blocks/src/blocks/image-slider/block.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-blocks/src/blocks/divider/block.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Blocks\\includes\\pro_manager\\base\\Pro_Extension_Upsell' not found in wp-content/plugins/ultimate-blocks/includes/pro_manager/extensions/Expand_Extension.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Ultimate_Blocks\\includes\\common\\interfaces\\I_Plugin_Data' not found in wp-content/plugins/ultimate-blocks/admin/data/Block_Menu_Info_Data.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Store\\StoreInterface' not found in wp-content/plugins/ultimate-blocks/vendor/vlucas/phpdotenv/src/Store/StringStore.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/ultimate-blocks/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/ultimate-blocks/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-blocks/src/blocks/notification-box/block.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=ultimate-blocks-help
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=ultimate-blocks-help 169 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #2, #3, #4, #5, #6, #7, #8, #9 in ultimate-blocks/assets to your readme.txt
The official readme.txt is a good inspiration

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

The principal PHP file in "Ultimate Blocks - WordPress Blocks Plugin" v. 3.0.8 is loaded by WordPress automatically on each request
79 characters long description:
Custom Blocks for Bloggers and Marketers. Create Better Content With Gutenberg.

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
Good job! No executable or dangerous file extensions detected79,476 lines of code in 476 files:
LanguageFilesBlank linesComment linesLines of code
PHP28810,85423,09761,099
JavaScript251,6451,54810,520
JSON83007,165
CSS736615410
Markdown4810251
SVG20022
HTML1009

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity33.95
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces30
Interfaces11
Traits3
Classes154
▷ Abstract classes74.55%
▷ Concrete classes14795.45%
▷ Final classes4027.21%
Methods1,949
▷ Static methods39020.01%
▷ Public methods1,42773.22%
▷ Protected methods552.82%
▷ Private methods46723.96%
Functions440
▷ Named functions34778.86%
▷ Anonymous functions9321.14%
Constants217
▷ Global constants13361.29%
▷ Class constants8438.71%
▷ Public constants7285.71%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
26 PNG files occupy 1.00MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/pro_manager/blocks/coupon/assets/coupon-ss.png16.46KB17.08KB0.00%
admin/images/banners/help-bg.png3.31KB0.13KB▼ 96.02%
library/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
includes/pro_manager/assets/img/content-toggle-panel-block/searchSummary.png15.20KB4.01KB▼ 73.61%
includes/pro_manager/assets/img/content-toggle-block/highlightColor.png18.78KB5.47KB▼ 70.89%