61% blue-wrench-videos-widget

Code Review | Blue Wrench Video Widget

WordPress plugin Blue Wrench Video Widget scored61%from 54 tests.

About plugin

  • Plugin page: blue-wrench-video...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 32
  • Update frequency: every 1.8 days
  • Top authors: nandasunil (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,564 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.66MB] [CPU: ▼53.57ms] Passed 4 tests

A check of server-side resources used by Blue Wrench Video Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.34 ▼1.129.52 ▼33.74
Dashboard /wp-admin2.35 ▼0.9912.49 ▼51.55
Posts /wp-admin/edit.php2.35 ▼1.0010.93 ▼36.97
Add New Post /wp-admin/post-new.php2.35 ▼3.5311.95 ▼92.02
Media Library /wp-admin/upload.php2.35 ▼0.889.53 ▼22.28
BlueWrench Videos /wp-admin/admin.php?page=bw_videos2.3511.09
Add new video /wp-admin/admin.php?page=bw_videos-manage2.3512.30

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 35 new files
Database: 1 new table, 8 new options
New tables
wp_bw_videos
New WordPress options
can_compress_scripts
Blue Wrench Video Widget Version
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_bw_video_widget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blue Wrench Video Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.38 ▼0.191.64 ▼0.3543.66 ▲0.64
Dashboard /wp-admin2,216 ▲395.56 ▼0.1294.64 ▼1.2587.87 ▲45.18
Posts /wp-admin/edit.php2,139 ▲421.96 ▼0.0737.03 ▼1.1233.73 ▼2.89
Add New Post /wp-admin/post-new.php1,562 ▲3423.10 ▼0.01681.87 ▲33.8464.14 ▲15.07
Media Library /wp-admin/upload.php1,436 ▲364.11 ▼0.12112.75 ▲11.9646.07 ▲1.30
BlueWrench Videos /wp-admin/admin.php?page=bw_videos1,0112.3124.7730.73
Add new video /wp-admin/admin.php?page=bw_videos-manage9472.0027.0631.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in BlueWrenchVideoWidget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_bw_video_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bw_videos-manage
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in BlueWrenchVideoWidget is deprecated since version 4.3.0! Use __construct() instead.

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 fix the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoDatabase.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoWidget.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoDatabase.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoDatabase.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoDatabase.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoDatabase.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/blue-wrench-videos-widget/lib/BlueWrenchVideoDatabase.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bw_videos-manage
    • > Network (severe)
    wp-content/plugins/blue-wrench-videos-widget/bluewrench-video-widget.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bw_videos-manage
    • > Network (severe)
    wp-content/plugins/bluewrench-video-widget/jquery-ui.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=bw_videos
    • > Network (severe)
    wp-content/plugins/bluewrench-video-widget/style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bw_videos-manage
    • > Network (severe)
    wp-content/plugins/bluewrench-video-widget/bw_script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bw_videos-manage
    • > Network (severe)
    wp-content/plugins/bluewrench-video-widget/images/video_icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=bw_videos-manage
    • > Network (severe)
    wp-content/plugins/bluewrench-video-widget/images/yahoo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === blue-wrench-videos-widget === )
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt is a good inspiration

blue-wrench-videos-widget/bluewrench-video-widget.php 85% from 13 tests

The principal PHP file in "Blue Wrench Video Widget" v. 2.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("blue-wrench-videos-widget.php" instead of "bluewrench-video-widget.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 421 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
Good job! No executable or dangerous file extensions detected2,123 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS246481,098
PHP7114118985
JavaScript21040

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.33
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods511.11%
▷ Public methods4293.33%
▷ Protected methods00.00%
▷ Private methods36.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
21 PNG files occupy 0.64MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
images/video_icon.png0.74KB0.65KB▼ 12.42%
images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
images/list_view.png0.48KB0.45KB▼ 7.27%