56% slideshow-gallery

Code Review | Slideshow Gallery LITE

WordPress plugin Slideshow Gallery LITE scored56%from 54 tests.

About plugin

  • Plugin page: slideshow-gallery
  • Plugin version: 1.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 22, 2009
  • Latest release: Jun 25, 2023
  • Number of updates: 203
  • Update frequency: every 24.8 days
  • Top authors: contrid (94.09%)mohsenr1 (3.94%)adamluzsi (2.96%)

Code review

54 tests

User reviews

741 reviews

Install metrics

10,000+ active /739,219 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.83MB] [CPU: ▲5.37ms] Passed 4 tests

A check of server-side resources used by Slideshow Gallery LITE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8444.07 ▼2.38
Dashboard /wp-admin4.14 ▲0.8357.41 ▲8.39
Posts /wp-admin/edit.php4.19 ▲0.8360.71 ▲11.00
Add New Post /wp-admin/post-new.php6.75 ▲0.8696.23 ▲4.46
Media Library /wp-admin/upload.php4.06 ▲0.8246.01 ▲12.37
Manage Slides /wp-admin/admin.php?page=slideshow-slides4.2342.43
Manage Galleries /wp-admin/admin.php?page=slideshow-galleries4.1245.85
Upgrade to PRO /wp-admin/admin.php?page=slideshow-lite-upgrade3.9741.99
Settings /wp-admin/admin.php?page=slideshow-settings4.3550.23

Server storage [IO: ▲3.73MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 157 new files
Database: 3 new tables, 38 new options
New tables
wp_gallery_galleriesslides
wp_gallery_galleries
wp_gallery_slides
New WordPress options
Gallerythumbopacity
Galleryeasing
Galleryautospeed
Gallerythumbactive
Galleryautoslide
Galleryslide_direction
can_compress_scripts
Galleryinfoheadingcontent
Galleryinfospeed
Gallerynavhover
...

Browser metrics Passed 4 tests

Slideshow Gallery LITE: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,205 ▲45914.49 ▲0.127.39 ▲5.0843.06 ▲0.34
Dashboard /wp-admin2,366 ▲1784.99 ▲0.11110.93 ▲0.8544.88 ▲0.48
Posts /wp-admin/edit.php2,243 ▲1512.27 ▲0.2539.47 ▲2.5037.48 ▲4.34
Add New Post /wp-admin/post-new.php1,623 ▲8917.90 ▼5.37665.89 ▲45.1553.00 ▲2.50
Media Library /wp-admin/upload.php1,542 ▲1544.35 ▲0.14100.66 ▼3.0347.33 ▲2.65
Manage Slides /wp-admin/admin.php?page=slideshow-slides1,3362.4447.7633.30
Manage Galleries /wp-admin/admin.php?page=slideshow-galleries1,2312.4538.5131.10
Upgrade to PRO /wp-admin/admin.php?page=slideshow-lite-upgrade1,2916.70200.8360.73
Settings /wp-admin/admin.php?page=slideshow-settings4,4144.00119.8594.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 3 tables
    • wp_gallery_slides
    • wp_gallery_galleries
    • wp_gallery_galleriesslides
  • This plugin does not fully uninstall, leaving 38 options in the database
    • can_compress_scripts
    • Gallerythumbwidth
    • Gallerystyles
    • Galleryimagesthickbox
    • Gallerythumbactive
    • widget_recent-posts
    • Galleryalwaysauto
    • Galleryeffect
    • Galleryinfoheadingcontent
    • widget_theysaidso_widget
    • ...

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
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=slideshow-galleries
    • > User deprecated in wp-includes/functions.php+5643
    File upgrade-functions.php is deprecated since version 2.5.0! Use wp-admin/includes/upgrade.php instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/slideshow-gallery/views/admin/metaboxes/settings-submit.php
    • > /wp-content/plugins/slideshow-gallery/views/admin/metaboxes/settings-styles.php
    • > /wp-content/plugins/slideshow-gallery/views/admin/metaboxes/settings-general.php
    • > /wp-content/plugins/slideshow-gallery/views/admin/slides/save.php
    • > /wp-content/plugins/slideshow-gallery/views/admin/metaboxes/settings-tech.php
    • > /wp-content/plugins/slideshow-gallery/views/admin/metaboxes/settings-wprelated.php
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/slideshow-gallery/views/admin/lite-upgrade.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/slideshow-gallery/includes/messages.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GalleryPlugin' not found in wp-content/plugins/slideshow-gallery/models/slideshow.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slideshow-gallery/views/admin/settings-submitserial.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/slideshow-gallery/views/admin/about.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/slideshow-gallery/includes/class.slide-list-table.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/slideshow-gallery/vendors/otf_regen_thumbs.php:182
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/slideshow-gallery/views/admin/settings-updates.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/slideshow-gallery/views/admin/metaboxes/settings-postspages.php:5
    • > PHP Notice
      Undefined variable: unique in wp-content/plugins/slideshow-gallery/views/default/gallery.php on line 3

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)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=slideshow-lite-upgrade
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

slideshow-gallery/slideshow-gallery.php 92% from 13 tests

Analyzing the main PHP file in "Slideshow Gallery LITE" version 1.7.8
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 494 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected15,088 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP551,5336717,214
JavaScript71,1923154,898
CSS63202782,321
SVG100655

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.41
Average class complexity51.05
▷ Minimum class complexity1.00
▷ Maximum class complexity340.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods232
▷ Static methods52.16%
▷ Public methods22697.41%
▷ Protected methods20.86%
▷ Private methods41.72%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/jquery-ui/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
images/jquery-ui/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
images/changelog-logo.png9.96KB4.99KB▼ 49.88%
views/default/images/colorbox/ie6/borderTopLeft.png0.21KB0.20KB▼ 4.63%
js/tinymce/gallery.png1.55KB0.86KB▼ 44.54%