66% all-bootstrap-blocks

Code Review | All Bootstrap Blocks

WordPress plugin All Bootstrap Blocks scored66%from 54 tests.

About plugin

  • Plugin page: all-bootstrap-blocks
  • Plugin version: 1.3.12
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 18, 2021
  • Latest release: Nov 27, 2023
  • Number of updates: 110
  • Update frequency: every 7.1 days
  • Top authors: areoimiles (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /36,608 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.86MB] [CPU: ▲32.19ms] Passed 4 tests

This is a short check of server-side resources used by All Bootstrap Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.03 ▲2.5657.66 ▲20.76
Dashboard /wp-admin6.27 ▲2.9681.56 ▲34.43
Posts /wp-admin/edit.php6.27 ▲2.9188.48 ▲36.38
Add New Post /wp-admin/post-new.php9.02 ▲3.13126.56 ▲37.19
Media Library /wp-admin/upload.php6.27 ▲3.0473.07 ▲37.23
Layout /wp-admin/admin.php?page=areoi-layout6.4878.78
Credits /wp-admin/admin.php?page=areoi-credits6.2766.10
Reset Settings /wp-admin/admin.php?page=areoi-reset_settings6.2763.03
Forms /wp-admin/admin.php?page=areoi-forms6.4880.27
Import / Export /wp-admin/admin.php?page=areoi-import-export6.2765.39
Content /wp-admin/admin.php?page=areoi-content6.4882.73
Components /wp-admin/admin.php?page=areoi-components6.48119.76
Dashboard /wp-admin/admin.php?page=areoi-dashboard6.4873.08
Customize /wp-admin/admin.php?page=areoi-customize6.4871.86

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

Input-output and database impact of this plugin
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 71.94MB)
Filesystem: 994 new files
Database: no new tables, 11 new options
New WordPress options
areoi-dashboard-global-bootstrap-css
areoi-dashboard-global-bootstrap-js
can_compress_scripts
widget_theysaidso_widget
areoi-theme-json-updated
widget_recent-comments
areoi-bootstrap-version
areoi-version
theysaidso_admin_options
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for All Bootstrap Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,139 ▲37715.70 ▲1.468.53 ▲6.9049.43 ▲12.01
Dashboard /wp-admin2,429 ▲2586.67 ▲1.09133.79 ▲37.6761.45 ▲18.04
Posts /wp-admin/edit.php2,365 ▲2653.84 ▲1.8360.46 ▲21.0849.96 ▲11.43
Add New Post /wp-admin/post-new.php1,659 ▲13320.98 ▼2.20728.87 ▲147.2758.57 ▲6.07
Media Library /wp-admin/upload.php1,500 ▲1004.65 ▲0.4686.21 ▼9.7955.65 ▲15.23
Layout /wp-admin/admin.php?page=areoi-layout2,4794.58102.5089.44
Credits /wp-admin/admin.php?page=areoi-credits1,2523.6771.7840.67
Reset Settings /wp-admin/admin.php?page=areoi-reset_settings1,0783.5759.6043.21
Forms /wp-admin/admin.php?page=areoi-forms3,9415.07160.1093.87
Import / Export /wp-admin/admin.php?page=areoi-import-export1,1143.1760.0941.77
Content /wp-admin/admin.php?page=areoi-content4,1835.41181.34116.46
Components /wp-admin/admin.php?page=areoi-components5,6706.28207.69106.27
Dashboard /wp-admin/admin.php?page=areoi-dashboard2,2904.0377.1380.88
Customize /wp-admin/admin.php?page=areoi-customize2,5355.0999.6171.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/all-bootstrap-blocks/uninstall.php+7
    Constant AREOI__VERSION already defined
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • areoi-theme-json-updated
    • widget_theysaidso_widget
    • areoi-version
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/all-bootstrap-blocks/views/partials/mailchimp.php
    • > /wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/grid.php
  • 562× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lightspeed_get_block_id() in wp-content/plugins/all-bootstrap-blocks/lightspeed/blocks/content-with-items/templates/accordion.php:3
    • > PHP Warning
      Use of undefined constant AREOI__PLUGIN_LIGHTSPEED_DIR - assumed 'AREOI__PLUGIN_LIGHTSPEED_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/arrow-outline.php on line 7
    • > PHP Notice
      Undefined variable: pattern_color in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/shapey-outline.php on line 3
    • > PHP Warning
      include(AREOI__PLUGIN_LIGHTSPEED_DIRpartials/pattern.php): failed to open stream: No such file or directory in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/bubble-fill-and-outline.php on line 13
    • > PHP Notice
      Undefined variable: pattern_color in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/angle-outline.php on line 11
    • > PHP Warning
      include(): Failed opening 'AREOI__PLUGIN_LIGHTSPEED_DIRpartials/pattern.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/square-angles.php on line 61
    • > PHP Warning
      Use of undefined constant AREOI__PLUGIN_LIGHTSPEED_DIR - assumed 'AREOI__PLUGIN_LIGHTSPEED_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/speech-angles.php on line 62
    • > PHP Warning
      include(): Failed opening 'AREOI__PLUGIN_LIGHTSPEED_DIRpartials/pattern.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/diagonal-outline.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'ABB\\ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/all-bootstrap-blocks/vendors/scssphp-1.6.0/src/Formatter/Expanded.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ABB\\ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/all-bootstrap-blocks/vendors/scssphp-1.6.0/src/Formatter/Nested.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
  • Requires php: The plugin version is formatted incorrectly
  • Screenshots: Please add descriptions for these screenshots #6, #8, #9 in all-bootstrap-blocks/assets to your readme.txt
You can take inspiration from this readme.txt

all-bootstrap-blocks/areoi.php 85% from 13 tests

The main PHP script in "All Bootstrap Blocks" version 1.3.12 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("all-bootstrap-blocks.php" instead of "areoi.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin123,568 lines of code in 791 files:
LanguageFilesBlank linesComment linesLines of code
PHP2915,2895,46932,813
JSON68173031,581
JavaScript1615,2094,52828,051
Sass1742,9102,43123,537
CSS5363745,940
SVG340331,460
HTML67092
Markdown228063
XML29531

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,431)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 199)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity53.54
▷ Minimum class complexity1.00
▷ Maximum class complexity1,431.00
Average method complexity5.73
▷ Minimum method complexity1.00
▷ Maximum method complexity199.00
Code structure
Namespaces9
Interfaces2
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes36.12%
Methods576
▷ Static methods9416.32%
▷ Public methods22438.89%
▷ Protected methods30552.95%
▷ Private methods478.16%
Functions228
▷ Named functions17777.63%
▷ Anonymous functions5122.37%
Constants89
▷ Global constants1719.10%
▷ Class constants7280.90%
▷ Public constants72100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
50 PNG files occupy 2.44MB with 1.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
blocks/strip/cover.png12.85KB4.21KB▼ 67.25%
blocks/modal-header/cover.png42.00KB16.96KB▼ 59.62%
blocks/post-grid/cover.png146.32KB46.62KB▼ 68.14%
blocks/row/cover.png11.64KB5.45KB▼ 53.17%
blocks/content-grid/cover.png146.32KB46.62KB▼ 68.14%