84% wp-bootstrap-blocks

Code Review | Bootstrap Blocks

WordPress plugin Bootstrap Blocks scored84%from 54 tests.

About plugin

  • Plugin page: wp-bootstrap-blocks
  • Plugin version: 5.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 84
  • Update frequency: every 20.3 days
  • Top authors: liip (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

10,000+ active /144,340 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.86ms] Passed 4 tests

Server-side resources used by Bootstrap Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.64 ▲2.95
Dashboard /wp-admin3.50 ▲0.1645.68 ▼14.94
Posts /wp-admin/edit.php3.62 ▲0.2646.40 ▲1.81
Add New Post /wp-admin/post-new.php6.11 ▲0.2292.90 ▼5.25
Media Library /wp-admin/upload.php3.43 ▲0.2035.77 ▲5.52
Bootstrap Blocks /wp-admin/options-general.php?page=wp-bootstrap-blocks_settings3.3933.35

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
wp-bootstrap-blocks_version
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Bootstrap Blocks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.37 ▲0.022.16 ▲0.4144.13 ▲0.90
Dashboard /wp-admin2,196 ▲165.55 ▼0.0484.81 ▼15.0839.70 ▼5.52
Posts /wp-admin/edit.php2,104 ▲12.07 ▲0.1036.99 ▼1.7733.78 ▲1.98
Add New Post /wp-admin/post-new.php6,200 ▲4,66018.88 ▼4.19934.14 ▲330.2670.70 ▲16.80
Media Library /wp-admin/upload.php1,401 ▲44.19 ▼0.00100.95 ▼3.4841.45 ▼5.43
Bootstrap Blocks /wp-admin/options-general.php?page=wp-bootstrap-blocks_settings8292.0026.0627.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • wp-bootstrap-blocks_version
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/wp-bootstrap-blocks/src/templates/column.php on line 61
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/wp-bootstrap-blocks/src/templates/row.php on line 69
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/wp-bootstrap-blocks/src/templates/row-css-grid.php on line 43
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/wp-bootstrap-blocks/src/templates/row-css-grid.php on line 45
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-bootstrap-blocks/src/templates/row-css-grid.php on line 36
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-bootstrap-blocks/src/templates/column.php on line 66
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-bootstrap-blocks/src/templates/column.php on line 47
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-bootstrap-blocks/src/templates/column-css-grid.php on line 58
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-bootstrap-blocks/src/templates/row.php on line 44
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-bootstrap-blocks/src/templates/row-css-grid.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Container block)
The official readme.txt is a good inspiration

wp-bootstrap-blocks/wp-bootstrap-blocks.php Passed 13 tests

The primary PHP file in "Bootstrap Blocks" version 5.2.0 is used by WordPress to initiate all plugin functionality
41 characters long description:
Bootstrap Gutenberg Blocks for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected3,258 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17114531,481
PHP17216808953
PO File2218254546
Sass63220208
JSON60065
CSS3005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity7.43
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods40
▷ Static methods1537.50%
▷ Public methods3075.00%
▷ Protected methods1025.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 3.63MB with 2.64MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png926.45KB251.69KB▼ 72.83%
screenshot-3.png915.01KB240.59KB▼ 73.71%
screenshot-4.png939.52KB262.36KB▼ 72.08%
screenshot-2.png934.57KB253.87KB▼ 72.84%