84% bootstrap-widget-styling

Code Review | Bootstrap Widget Styling

WordPress plugin Bootstrap Widget Styling scored84%from 54 tests.

About plugin

  • Plugin page: bootstrap-widget-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: May 26, 2018
  • Number of updates: 19
  • Update frequency: every 74.3 days
  • Top authors: ryankienstra (52.63%)rkienstr (52.63%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /4,380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.36ms] Passed 4 tests

This is a short check of server-side resources used by Bootstrap Widget Styling
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.48 ▼3.78
Dashboard /wp-admin3.35 ▲0.0447.49 ▼1.45
Posts /wp-admin/edit.php3.46 ▲0.1045.88 ▼1.16
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.41 ▼11.03
Media Library /wp-admin/upload.php3.27 ▲0.0436.81 ▲4.28
Widget Styling /wp-admin/options-general.php?page=bws_options_page3.2433.06

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bootstrap Widget Styling
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.31 ▼1.061.85 ▲0.1841.09 ▼5.85
Dashboard /wp-admin2,213 ▲315.88 ▲0.04101.10 ▲0.2441.33 ▲0.10
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0536.45 ▼1.2929.44 ▼4.32
Add New Post /wp-admin/post-new.php1,536 ▲1623.20 ▼0.04690.90 ▼24.5253.87 ▼4.85
Media Library /wp-admin/upload.php1,389 ▼24.17 ▼0.0397.53 ▼5.4143.61 ▲2.06
Widget Styling /wp-admin/options-general.php?page=bws_options_page8062.0622.8640.81

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Meta' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-meta.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Recent_Posts' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-recent-posts.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Categories' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-categories.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Nav_Menu_Widget' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-nav-menu-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BootstrapWidgetStyling\\add_action() in wp-content/plugins/bootstrap-widget-styling/php/class-setting.php:87
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Recent_Comments' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-recent-comments.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Pages' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-pages.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Archives' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-archives.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Search' not found in wp-content/plugins/bootstrap-widget-styling/php/widgets/class-bws-widget-search.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: mobile, default widgets, widgets, responsive, bootstrap

bootstrap-widget-styling/bootstrap-widget-styling.php 92% from 13 tests

"Bootstrap Widget Styling" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,778 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON1001,389
PHP1391391370
XML15219

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.09
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin