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: 5.8.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,452 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼149.82ms] Passed 4 tests

A check of server-side resources used by WP Bootstrap Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.05 ▲0.2125.99 ▲1.60
Dashboard /wp-admin3.34 ▲0.2842.45 ▲2.27
Posts /wp-admin/edit.php3.40 ▲0.2938.32 ▼0.61
Add New Post /wp-admin/post-new.php5.62 ▲0.1877.25 ▼600.79
Media Library /wp-admin/upload.php3.20 ▲0.2025.26 ▲0.53

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_wpbw-navbar
widget_wpbw-button
widget_wpbw-panel
widget_wpbw-alert
widget_wpbw-image
widget_wpbw-well
widget_wpbw-embed

Browser metrics Passed 4 tests

A check of browser resources used by WP Bootstrap Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,026 ▲42517.71 ▲1.989.83 ▲3.9277.94 ▲2.03
Dashboard /wp-admin3,129 ▲2368.05 ▲1.87140.59 ▲9.36167.91 ▼11.45
Posts /wp-admin/edit.php2,972 ▲2325.14 ▲1.8977.71 ▲12.15132.65 ▼5.90
Add New Post /wp-admin/post-new.php1,885 ▼1,85820.75 ▲1.50377.34 ▼36.56177.22 ▲17.66
Media Library /wp-admin/upload.php1,753 ▲15.46 ▼0.04108.33 ▼33.08185.70 ▲2.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_wpbw-button
    • widget_wpbw-image
    • widget_wpbw-well
    • widget_wpbw-panel
    • widget_wpbw-alert
    • widget_wpbw-embed
    • widget_wpbw-navbar

Smoke tests 50% 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)
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-bootstrap-widgets/wp-bootstrap-widgets.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/navigation-bar.php:8
    • > 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 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 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: Class 'WP_Widget' not found in wp-content/plugins/wp-bootstrap-widgets/widgets/embed.php:9
    • > 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

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

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

"WP Bootstrap Widgets" version 0.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress 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 programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! 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

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin