79% bu-slideshow

Code Review | BU Slideshow

WordPress plugin BU Slideshow scored79%from 54 tests.

About plugin

  • Plugin page: bu-slideshow
  • Plugin version: 2.3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.6
  • WordPress version: 6.3.1
  • First release: Oct 2, 2014
  • Latest release: Sep 4, 2018
  • Number of updates: 27
  • Update frequency: every 53.1 days
  • Top authors: bostonu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,242 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.03ms] Passed 4 tests

Analyzing server-side resources used by BU Slideshow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.10 ▼1.25
Dashboard /wp-admin3.34 ▼0.0045.81 ▼18.63
Posts /wp-admin/edit.php3.40 ▲0.0448.76 ▼2.10
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.03 ▼14.12
Media Library /wp-admin/upload.php3.27 ▲0.0438.90 ▲1.19
Preview Slideshow /wp-admin/admin.php?page=bu-preview-slideshow3.2633.69
Slideshows /wp-admin/admin.php?page=bu-slideshow3.2833.91
Edit Slideshow /wp-admin/admin.php?page=bu-edit-slideshow3.2431.23
Add Slideshow /wp-admin/admin.php?page=bu-add-slideshow3.3439.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
bu_slideshow_version
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BU Slideshow
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.41 ▲0.091.69 ▲0.0342.16 ▲1.39
Dashboard /wp-admin2,221 ▲505.64 ▲0.0783.73 ▼11.0538.99 ▼2.96
Posts /wp-admin/edit.php2,123 ▲262.04 ▲0.0640.34 ▲2.6037.00 ▲2.08
Add New Post /wp-admin/post-new.php1,659 ▲13321.92 ▼1.19650.54 ▼52.7755.01 ▲4.08
Media Library /wp-admin/upload.php1,423 ▲234.35 ▲0.1597.86 ▼14.3142.60 ▼4.26
Preview Slideshow /wp-admin/admin.php?page=bu-preview-slideshow7972.0229.4332.88
Slideshows /wp-admin/admin.php?page=bu-slideshow8592.3629.4424.76
Edit Slideshow /wp-admin/admin.php?page=bu-edit-slideshow7121.7111.4719.69
Add Slideshow /wp-admin/admin.php?page=bu-add-slideshow1,2153.3245.3431.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • bu_slideshow_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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
    • > GET request to /wp-admin/admin.php?page=bu-preview-slideshow
    • > Notice in wp-content/plugins/bu-slideshow/interface/preview-slideshow.php+10
    Undefined variable: id

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BU_Slideshow' not found in wp-content/plugins/bu-slideshow/interface/edit-slideshow-ui.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/bu-slideshow/uninstall.php:7
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/bu-slideshow/tests/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/bu-slideshow/tests/test-create-slideshows.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bu-slideshow/interface/edit-slideshow-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bu-slideshow/bu-slideshow.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bu-slideshow/interface/preview-slideshow.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bu-slideshow/interface/manage-slideshows.php:2
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/bu-slideshow/tests/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bu-slideshow/class-bu-slide.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: boston university, slideshow, bu, images

bu-slideshow/bu-slideshow.php Passed 13 tests

This is the main PHP file of "BU Slideshow" version 2.3.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
77 characters long description:
Allows for the creation and display of animated slideshows. Uses sequence.js.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,415 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113441991,552
PHP143773391,390
CSS7214761
LESS11185477
Markdown132092
Bourne Shell121685
YAML18025
JSON10019
XML10014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity46.25
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods67
▷ Static methods4770.15%
▷ Public methods6495.52%
▷ Protected methods22.99%
▷ Private methods11.49%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
interface/img/sprite.png3.61KB0.69KB▼ 80.88%
interface/img/tb-close.png0.49KB0.42KB▼ 14.62%
interface/img/insert-slideshow-icon.png1.03KB0.11KB▼ 89.59%
interface/js/bu-modal/img/bg.png1.04KB0.10KB▼ 90.16%
interface/img/arrows.png1.44KB0.41KB▼ 71.33%