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.11
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 18, 2021
  • Latest release: Oct 20, 2023
  • Number of updates: 109
  • Update frequency: every 6.8 days
  • Top authors: areoimiles (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /32,936 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.85MB] [CPU: ▲24.38ms] 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.01 ▲2.5556.01 ▲20.05
Dashboard /wp-admin6.26 ▲2.9276.40 ▲18.83
Posts /wp-admin/edit.php6.26 ▲2.9185.83 ▲40.21
Add New Post /wp-admin/post-new.php9.01 ▲3.13116.64 ▲20.45
Media Library /wp-admin/upload.php6.26 ▲3.0369.77 ▲38.18
Import / Export /wp-admin/admin.php?page=areoi-import-export6.2664.21
Reset Settings /wp-admin/admin.php?page=areoi-reset_settings6.2661.31
Dashboard /wp-admin/admin.php?page=areoi-dashboard6.4770.03
Components /wp-admin/admin.php?page=areoi-components6.4780.18
Forms /wp-admin/admin.php?page=areoi-forms6.4775.82
Content /wp-admin/admin.php?page=areoi-content6.4778.59
Customize /wp-admin/admin.php?page=areoi-customize6.4769.49
Layout /wp-admin/admin.php?page=areoi-layout6.4771.95
Credits /wp-admin/admin.php?page=areoi-credits6.2663.49

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-version
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
areoi-theme-json-updated
areoi-dashboard-global-bootstrap-js
areoi-bootstrap-version
...

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,138 ▲37715.60 ▲1.049.10 ▲7.5350.34 ▲10.98
Dashboard /wp-admin2,429 ▲2526.68 ▲1.02126.43 ▲36.6656.68 ▲16.18
Posts /wp-admin/edit.php2,361 ▲2583.83 ▲1.8863.17 ▲27.7850.00 ▲17.06
Add New Post /wp-admin/post-new.php6,526 ▲4,99826.83 ▲3.72995.00 ▲325.5666.51 ▲7.80
Media Library /wp-admin/upload.php1,504 ▲1014.63 ▲0.3884.58 ▼25.8954.83 ▲9.01
Import / Export /wp-admin/admin.php?page=areoi-import-export1,1193.5759.9038.10
Reset Settings /wp-admin/admin.php?page=areoi-reset_settings1,0853.6858.9041.02
Dashboard /wp-admin/admin.php?page=areoi-dashboard2,2804.0478.1775.17
Components /wp-admin/admin.php?page=areoi-components5,6676.28215.9989.92
Forms /wp-admin/admin.php?page=areoi-forms3,9504.86121.37101.32
Content /wp-admin/admin.php?page=areoi-content4,1805.40142.7599.16
Customize /wp-admin/admin.php?page=areoi-customize2,5475.15104.1378.67
Layout /wp-admin/admin.php?page=areoi-layout2,4944.5884.1579.70
Credits /wp-admin/admin.php?page=areoi-credits1,2553.7082.5544.18

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
    • db_upgraded
    • areoi-version
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • areoi-theme-json-updated

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 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/half-circle-outline.php on line 9
    • > 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.php on line 9
    • > 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/triangle-fill-and-outline.php on line 20
    • > 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/shapey-fill-and-outline.php on line 14
    • > 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/circle-fill-and-outline.php on line 11
    • > 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-fill-and-outline.php on line 25
    • > 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/3d-square-fill-and-outline.php on line 10
    • > PHP Notice
      Undefined variable: pattern_color in wp-content/plugins/all-bootstrap-blocks/lightspeed/patterns/speech-fill-and-outline.php on line 5
    • > 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/shapey.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lightspeed_get_posts() in wp-content/plugins/all-bootstrap-blocks/lightspeed/blocks/posts/templates/3-column-alt.php:2

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 php: The plugin version is formatted incorrectly
  • Requires at least: 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.11 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)
  • 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")

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,559 lines of code in 791 files:
LanguageFilesBlank linesComment linesLines of code
PHP2915,2835,44432,813
JSON68173031,581
JavaScript1615,2094,52828,051
Sass1742,9072,43123,528
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.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
blocks/alert/cover.png4.34KB1.83KB▼ 57.98%
blocks/collapse/cover.png7.84KB2.99KB▼ 61.90%
blocks/button/cover.png5.44KB2.68KB▼ 50.78%
blocks/spinner/cover.png18.45KB0.58KB▼ 96.84%
blocks/offcanvas/cover.png42.00KB5.22KB▼ 87.58%