78% wp-bootstrap-widgets

Code Review | WP Bootstrap Widgets

WordPress plugin WP Bootstrap Widgets scored 78% from 54 tests.

About plugin

  • Plugin page: wp-bootstrap-widgets
  • Plugin version: 0.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: Oct 12, 2016
  • Number of updates: 14
  • Update frequency: every 7.5 days
  • Top authors: inxilpro (64.29%)jgrossi (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲1.45ms] Passed 4 tests

This is a short check of server-side resources used by WP Bootstrap Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2439.75 ▼2.90
Dashboard /wp-admin3.59 ▲0.2951.73 ▲7.51
Posts /wp-admin/edit.php3.65 ▲0.2957.21 ▲9.61
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.54 ▼8.44
Media Library /wp-admin/upload.php3.43 ▲0.2044.20 ▲10.47

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
widget_wpbw-button
widget_wpbw-navbar
theysaidso_admin_options
widget_wpbw-image
widget_wpbw-panel
db_upgraded
widget_recent-comments
widget_wpbw-embed
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

WP Bootstrap Widgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,051 ▲31615.02 ▲0.655.62 ▲3.8737.33 ▼9.43
Dashboard /wp-admin2,347 ▲1596.46 ▲0.55134.13 ▲19.8943.17 ▲0.34
Posts /wp-admin/edit.php2,250 ▲1613.37 ▲1.3951.86 ▲12.9634.67 ▲0.45
Add New Post /wp-admin/post-new.php1,671 ▲13722.26 ▼0.72641.90 ▼34.3337.12 ▼28.86
Media Library /wp-admin/upload.php1,395 ▲104.13 ▼0.0981.32 ▼19.8741.63 ▼2.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_wpbw-alert
    • widget_wpbw-button
    • widget_recent-comments
    • widget_wpbw-image
    • widget_wpbw-well
    • widget_wpbw-embed
    • widget_theysaidso_widget
    • widget_wpbw-navbar
    • theysaidso_admin_options
    • widget_wpbw-panel
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-bootstrap-widgets/wp-bootstrap-widgets.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/image.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-bootstrap-widgets/views/requirements-error.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/button.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/alert.php:8
    • > PHP Warning
      Use of undefined constant WBW_REQUIRED_PHP_VERSION - assumed 'WBW_REQUIRED_PHP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-bootstrap-widgets/views/requirements-error.php on line 6
    • > PHP Warning
      Use of undefined constant WBW_NAME - assumed 'WBW_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-bootstrap-widgets/views/requirements-error.php on line 2
    • > PHP Warning
      Use of undefined constant WBW_REQUIRED_WP_VERSION - assumed 'WBW_REQUIRED_WP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-bootstrap-widgets/views/requirements-error.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/well.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/wp-bootstrap-widgets/include/navigation-bar-walker.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/embed.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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 your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

The primary PHP file in "WP Bootstrap Widgets" version 0.3.2 is used by WordPress to initiate all plugin functionality
41 characters long description:
Bootstrap Components as WordPress Widgets

Code Analysis Passed 3 tests

File types Passed 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
Success! There were no dangerous files found in this plugin1,035 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11115524839
JavaScript37638183
CSS20013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.88
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods7098.59%
▷ Protected methods11.41%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants550.00%
▷ Class constants550.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected