67% otter-blocks

Code Review | Otter Blocks - Gutenberg Blocks, Page Builder for Gutenberg Editor & FSE

WordPress plugin Otter Blocks - Gutenberg Blocks, Page Builder for Gutenberg Editor & FSE scored67%from 54 tests.

About plugin

  • Plugin page: otter-blocks
  • Plugin version: 2.5.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 17, 2018
  • Latest release: Nov 22, 2023
  • Number of updates: 134
  • Update frequency: every 13.9 days
  • Top authors: themeisle (76.87%)hardeepasrani (23.88%)

Code review

54 tests

User reviews

177 reviews

Install metrics

300,000+ active /5,946,841 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
This plugin's installer ran successfully

Server metrics [RAM: ▲4.43MB] [CPU: ▲39.92ms] 75% from 4 tests

A check of server-side resources used by Otter Blocks - Gutenberg Blocks, Page Builder for Gutenberg Editor & FSE
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 3,860.09ms on /wp-admin/admin.php?page=ti-about-otter_blocks)
PageMemory (MB)CPU Time (ms)
Home /9.42 ▲5.9586.77 ▲45.57
Dashboard /wp-admin7.63 ▲4.28140.22 ▲74.65
Posts /wp-admin/edit.php7.65 ▲4.2984.17 ▲37.18
Add New Post /wp-admin/post-new.php10.83 ▲4.94144.46 ▲43.75
Media Library /wp-admin/upload.php7.46 ▲4.2369.16 ▲33.16
About Us /wp-admin/admin.php?page=ti-about-otter_blocks8.543,860.09
Form Submissions /wp-admin/admin.php?page=form-submissions-free7.4361.22
Blocks /wp-admin/admin.php?page=otter-blocks-toggle7.4360.54
Settings /wp-admin/admin.php?page=otter7.4768.96

Server storage [IO: ▲13.98MB] [DB: ▲0.91MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 1,074 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
otter_blocks_install
themeisle_blocks_db_version
themeisle_blocks_settings_redirect
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Otter Blocks - Gutenberg Blocks, Page Builder for Gutenberg Editor & FSE
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,138 ▲37614.33 ▼0.011.97 ▲0.3728.88 ▼14.61
Dashboard /wp-admin2,515 ▲3485.67 ▲0.0596.24 ▼6.4049.96 ▲8.49
Posts /wp-admin/edit.php2,302 ▲2022.01 ▼0.0141.39 ▲4.8537.74 ▲1.24
Add New Post /wp-admin/post-new.php1,737 ▲21122.66 ▼0.97954.15 ▲336.1549.77 ▲9.41
Media Library /wp-admin/upload.php1,602 ▲2024.22 ▲0.02100.70 ▲4.9942.93 ▲2.12
About Us /wp-admin/admin.php?page=ti-about-otter_blocks1,2906.53145.7958.77
Form Submissions /wp-admin/admin.php?page=form-submissions-free1,1061.7832.9035.44
Blocks /wp-admin/admin.php?page=otter-blocks-toggle2,49813.75176.70149.39
Settings /wp-admin/admin.php?page=otter1,37712.59139.9854.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.91MB] 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: 9 options
    • themeisle_blocks_db_version
    • widget_theysaidso_widget
    • otter_blocks_install
    • theysaidso_admin_options
    • themeisle_blocks_settings_redirect
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/otter-blocks/vendor/masterminds/html5/bin/entities.php
  • 352× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/otter-blocks/vendor/sabberworm/php-css-parser/src/Property/CSSNamespace.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/SetupAttempt.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/Service/TestHelpers/CustomerService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/Service/Treasury/TransactionEntryService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ThemeIsle\\GutenbergBlocks\\Base_CSS' not found in wp-content/plugins/otter-blocks/inc/css/blocks/class-progress-bar-css.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/otter-blocks/inc/patterns/content-with-progress-bars.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/CashBalance.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/ApplicationFeeRefund.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/SubscriptionItem.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/lib/Service/SourceService.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: editor, post blocks, page builder, wordpress blocks, gutenberg blocks...

otter-blocks/otter-blocks.php 85% from 13 tests

The principal PHP file in "Otter Blocks - Gutenberg Blocks, Page Builder for Gutenberg Editor & FSE" v. 2.5.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 218 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/otter-blocks/vendor/stripe/stripe-php/data/ca-certificates.crt
109,614 lines of code in 850 files:
LanguageFilesBlank linesComment linesLines of code
PHP5217,70524,58544,883
CSS1643,9401,43931,084
JSON991018,695
SVG13009,701
Markdown142,20305,042
JavaScript3828133194
XML10015

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 107)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.44
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity107.00
Code structure
Namespaces64
Interfaces17
Traits9
Classes428
▷ Abstract classes173.97%
▷ Concrete classes41196.03%
▷ Final classes10.24%
Methods2,331
▷ Static methods36715.74%
▷ Public methods2,07188.85%
▷ Protected methods1134.85%
▷ Private methods1476.31%
Functions682
▷ Named functions111.61%
▷ Anonymous functions67198.39%
Constants1,665
▷ Global constants171.02%
▷ Class constants1,64898.98%
▷ Public constants1,648100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
32 PNG files occupy 1.68MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icons/map-dark.png20.87KB18.75KB▼ 10.12%
assets/icons/map-night.png20.46KB18.67KB▼ 8.76%
assets/images/guide/welcome-finish.png43.06KB44.91KB0.00%
assets/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%
assets/images/count-animation.png33.99KB9.04KB▼ 73.40%