10% bw-slideshow

Code Review | BW Slideshow

WordPress plugin BW Slideshow scored10%from 54 tests.

About plugin

  • Plugin page: bw-slideshow
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2014
  • Latest release: Mar 12, 2014
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: brainymore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,232 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/bw-slideshow/bw-slideshow-widget.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; bw_slideshow_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼49.41ms] Passed 4 tests

An overview of server-side resources used by BW Slideshow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.47 ▼33.64
Dashboard /wp-admin2.29 ▼1.0114.05 ▼38.38
Posts /wp-admin/edit.php2.29 ▼1.0610.99 ▼36.49
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.54 ▼89.13
Media Library /wp-admin/upload.php2.29 ▼0.9411.86 ▼25.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_bw-slideshow-widget
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BW Slideshow
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.50 ▲0.143.62 ▲1.7443.41 ▼3.36
Dashboard /wp-admin2,206 ▲184.86 ▼0.03107.44 ▼9.4844.22 ▲0.08
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0040.52 ▲3.2534.98 ▼1.14
Add New Post /wp-admin/post-new.php1,538 ▲2423.30 ▲5.48673.81 ▼33.6359.67 ▼5.01
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0195.70 ▼9.2141.05 ▼7.39

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in bw_slideshow_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_bw-slideshow-widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bw-slideshow/themes/theme2.php
    • > /wp-content/plugins/bw-slideshow/themes/theme1.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bw-slideshow/bw-slideshow-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 29 tag instead of maximum 10
You can take inspiration from this readme.txt

bw-slideshow/bw-slideshow-widget.php 92% from 13 tests

Analyzing the main PHP file in "BW Slideshow" version 1.0
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bw-slideshow.php" instead of "bw-slideshow-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,103 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22681001,412
PHP38046638
CSS1101153

PHP code Passed 2 tests

This is a very shot review of 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.37
Average class complexity94.00
▷ Minimum class complexity94.00
▷ Maximum class complexity94.00
Average method complexity16.50
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/sprite-default.png2.60KB1.33KB▼ 49.02%