68% slideshow-jquery-image-gallery

Code Review | Slideshow

WordPress plugin Slideshow scored 68% from 54 tests.

About plugin

  • Plugin page: slideshow-jquery-...
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 5.9.2
  • First release: May 31, 2012
  • Latest release: Nov 21, 2015
  • Number of updates: 300
  • Update frequency: every 4.2 days
  • Top authors: stefanboonstra (100%)

Code review

54 tests

User reviews

1200 reviews

Install metrics

50,000+ active / 1,088,697 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼2.07MB] [CPU: ▼337.97ms] Passed 4 tests

Server-side resources used by Slideshow
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.228.12 ▼41.49
Dashboard /wp-admin2.33 ▼1.097.75 ▼26.71
Posts /wp-admin/edit.php2.33 ▼1.328.54 ▼27.96
Add New Post /wp-admin/post-new.php2.32 ▼4.658.46 ▼1,255.73
Media Library /wp-admin/upload.php2.33 ▼0.977.85 ▼15.67
General Settings /wp-admin/edit.php?post_type=slideshow&page=general_settings2.338.06
Add New /wp-admin/post-new.php?post_type=slideshow2.329.18
Slideshows /wp-admin/edit.php?post_type=slideshow2.337.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 100 new files
Database: no new tables, 2 new options
New WordPress options
slideshow-jquery-image-gallery-plugin-version
widget_slideshowwidget

Browser metrics Passed 4 tests

Slideshow: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,860 ▲10616.25 ▲0.205.81 ▼0.342.67 ▼0.22
Dashboard /wp-admin2,954 ▲966.95 ▲0.75118.63 ▼33.75161.57 ▼5.00
Posts /wp-admin/edit.php2,756 ▲653.24 ▲0.0171.09 ▲7.22165.68 ▲24.60
Add New Post /wp-admin/post-new.php1,712 ▲5716.01 ▼4.25405.02 ▼14.86173.53 ▲9.79
Media Library /wp-admin/upload.php1,757 ▲595.99 ▲0.51116.14 ▼19.58185.31 ▼0.37
General Settings /wp-admin/edit.php?post_type=slideshow&page=general_settings2,6745.0374.00125.79
Add New /wp-admin/post-new.php?post_type=slideshow3,8666.10102.62145.19
Slideshows /wp-admin/edit.php?post_type=slideshow1,6475.2676.47116.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/slideshow-jquery-image-gallery/classes/SlideshowPluginWidget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; SlideshowPluginWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 2 options
    • slideshow-jquery-image-gallery-plugin-version
    • widget_slideshowwidget

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
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=slideshow
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/slideshow-jquery-image-gallery/classes/SlideshowPluginWidget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; SlideshowPluginWidget has a deprecated constructor

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 fix the following items
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginShortcode/shortcode-inserter.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginPostType/style-settings.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginPostType/support-plugin.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginSlideshowSlide/backend_video.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginPostType/information.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/slideshow-jquery-image-gallery/classes/SlideshowPluginWidget.php:8
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginGeneralSettings/general-settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slideshow-jquery-image-gallery/slideshow.php:38
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginGeneralSettings/custom-styles-tab.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginGeneralSettings/default-slideshow-settings-tab.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

slideshow-jquery-image-gallery/slideshow.php 85% from 13 tests

The principal PHP file in "Slideshow" v. 2.3.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("slideshow-jquery-image-gallery.php" instead of "slideshow.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 247 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected12,717 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PO File223,6457,7838,383
PHP318819693,440
CSS6920644
SVG400236
JavaScript21014

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.45
Average class complexity26.92
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity5.19
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods75
▷ Static methods7093.33%
▷ Public methods6384.00%
▷ Protected methods00.00%
▷ Private methods1216.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/SlideshowPluginPostType/adminIcon32.png0.41KB0.19KB▼ 53.85%
images/SlideshowPlugin/light-arrows.png3.65KB0.87KB▼ 76.16%
images/SlideshowPluginPostType/adminIcon.png2.80KB0.13KB▼ 95.46%
images/SlideshowPlugin/dark-arrows.png3.67KB0.42KB▼ 88.63%
images/SlideshowPlugin/light-controlpanel.png2.90KB0.23KB▼ 92.08%