10% sh-slideshow

Code Review | SH Slideshow

WordPress plugin SH Slideshow scored 10% from 54 tests.

About plugin

  • Plugin page: sh-slideshow
  • Plugin version: 4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2011
  • Latest release: Feb 24, 2014
  • Number of updates: 256
  • Update frequency: every 4.3 days
  • Top authors: samhoamt (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 26,453 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/sh-slideshow/shslideshow.php+129
    Undefined variable: sql_delete

Server metrics [RAM: ▼0.94MB] [CPU: ▼35.92ms] Passed 4 tests

An overview of server-side resources used by SH Slideshow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.19 ▼6.51
Dashboard /wp-admin3.00 ▼0.3020.84 ▼32.10
Posts /wp-admin/edit.php3.00 ▼0.3627.32 ▼22.51
Add New Post /wp-admin/post-new.php3.00 ▼2.8920.72 ▼78.02
Media Library /wp-admin/upload.php3.00 ▼0.2322.23 ▼11.05
Settings /wp-admin/admin.php?page=sh-slideshow/settings.php3.0021.62
Manage /wp-admin/admin.php?page=sh-slideshow/manage.php3.0023.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 new files
Database: 2 new tables, 8 new options
New tables
wp_sh_slideshow
wp_sh_slides
New WordPress options
theysaidso_admin_options
sh_ss_drop_database
can_compress_scripts
widget_recent-posts
widget_recent-comments
sh_ss_permission
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by SH Slideshow
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16414.06 ▼0.305.13 ▲3.3136.52 ▼10.64
Dashboard /wp-admin2,224 ▲394.88 ▼0.99113.33 ▼7.5343.82 ▼0.55
Posts /wp-admin/edit.php2,122 ▲332.36 ▲0.3748.90 ▲13.6337.15 ▲2.86
Add New Post /wp-admin/post-new.php1,549 ▲718.35 ▲0.02632.90 ▼16.1746.49 ▼29.19
Media Library /wp-admin/upload.php1,416 ▲344.22 ▲0.06107.47 ▲6.1742.01 ▼2.94
Settings /wp-admin/admin.php?page=sh-slideshow/settings.php9192.0039.3026.87
Manage /wp-admin/admin.php?page=sh-slideshow/manage.php9132.0926.1126.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_sh_slides
    • wp_sh_slideshow
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sh-slideshow/manage.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sh-slideshow/manage.php
    • > Notice in wp-content/plugins/sh-slideshow/functions.php+27
    Undefined index: submit
    • > GET request to /wp-admin/admin.php?page=sh-slideshow/manage.php
    • > Notice in wp-content/plugins/sh-slideshow/manage.php+63
    Undefined index: action

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sh-slideshow/ajax.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sh-slideshow/settings.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sh-slideshow/settings.php:23
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sh-slideshow/manage.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/sh-slideshow/page.php:20
    • > PHP Notice
      Undefined index: submit in wp-content/plugins/sh-slideshow/settings.php on line 14
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sh-slideshow/manage.php on line 46
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sh-slideshow/manage.php on line 43
    • > PHP Notice
      Undefined index: action in wp-content/plugins/sh-slideshow/manage.php on line 63
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sh-slideshow/manage.php on line 27
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sh-slideshow/functions.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=sh-slideshow/manage.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,underscore,shortcode,media-upload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at $.fn.mColorPicker.events (/wp-content/plugins/sh-slideshow/mColorPicker.js:103:26)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sh-slideshow/mColorPicker.js:594:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,underscore,shortcode,media-upload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,underscore,shortcode,media-upload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=sh-slideshow/manage.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,underscore,shortcode,media-upload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
The official readme.txt might help

sh-slideshow/shslideshow.php 92% from 13 tests

"SH Slideshow" version 4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sh-slideshow.php" instead of "shslideshow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,704 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42771541,639
PHP6481421,065

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity2.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/picker.png5.00KB9.37KB0.00%
images/color.png0.87KB1.07KB0.00%
images/delete.png4.22KB1.00KB▼ 76.40%
images/meta100.png0.81KB1.03KB0.00%
images/sort.png0.22KB0.13KB▼ 39.01%