84% slideshow-reloaded

Code Review | Slideshow Reloaded

WordPress plugin Slideshow Reloaded scored84%from 54 tests.

About plugin

  • Plugin page: slideshow-reloaded
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Sep 29, 2019
  • Number of updates: 4
  • Update frequency: every 11.8 days
  • Top authors: lerougeliet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.60ms] Passed 4 tests

A check of server-side resources used by Slideshow Reloaded
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2740.35 ▼0.27
Dashboard /wp-admin3.56 ▲0.2153.38 ▼9.86
Posts /wp-admin/edit.php3.67 ▲0.3148.38 ▼2.71
Add New Post /wp-admin/post-new.php6.25 ▲0.3599.26 ▼5.56
Media Library /wp-admin/upload.php3.48 ▲0.2441.77 ▲4.25
Add New /wp-admin/post-new.php?post_type=slideshow3.6553.63
General Settings /wp-admin/edit.php?post_type=slideshow&page=general_settings3.6844.13
Slideshows /wp-admin/edit.php?post_type=slideshow3.5545.11

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 97 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_slideshowwidget
widget_recent-comments
db_upgraded
slideshow-reloaded-plugin-version
slideshow-reloaded-last-fetch-upsell

Browser metrics Passed 4 tests

Slideshow Reloaded: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲7613.16 ▼1.074.90 ▲3.0138.88 ▼0.28
Dashboard /wp-admin2,253 ▲764.89 ▼0.8392.56 ▲2.5341.59 ▲1.65
Posts /wp-admin/edit.php2,138 ▲352.37 ▲0.4037.10 ▲0.2035.98 ▲1.06
Add New Post /wp-admin/post-new.php1,576 ▲5023.27 ▼0.26602.54 ▼63.2134.54 ▼36.46
Media Library /wp-admin/upload.php1,459 ▲624.42 ▲0.1791.24 ▼26.0542.24 ▼6.09
Add New /wp-admin/post-new.php?post_type=slideshow2,8564.0772.0540.01
General Settings /wp-admin/edit.php?post_type=slideshow&page=general_settings1,8203.4741.3428.90
Slideshows /wp-admin/edit.php?post_type=slideshow1,2833.7046.0127.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • db_upgraded
    • slideshow-reloaded-plugin-version
    • theysaidso_admin_options
    • widget_slideshowwidget
    • can_compress_scripts
    • slideshow-reloaded-last-fetch-upsell
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedGeneralSettings/general-settings-tab.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedSlideshowSlide/backend_attachment.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/slideshow-reloaded/includes/SlideshowReloadedWidget.php:8
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedPostType/settings.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedGeneralSettings/general-settings.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedPostType/slides.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedSlideshowSlide/backend_video.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedGeneralSettings/default-slideshow-settings-tab.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedSlideshowSlide/backend_templates.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/slideshow-reloaded/views/SlideshowReloadedShortcode/shortcode-inserter.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: slideshow, gallery, carousel, photo, slider

slideshow-reloaded/slideshow.php 85% from 13 tests

"Slideshow Reloaded" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 256 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("slideshow-reloaded.php" instead of "slideshow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin11,480 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PO File223,6457,7838,383
PHP296868182,465
CSS4780376
SVG400236
JavaScript22020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity17.75
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods66
▷ Static methods6090.91%
▷ Public methods6395.45%
▷ Protected methods00.00%
▷ Private methods34.55%
Functions5
▷ Named functions5100.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.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/light-bullet.png2.87KB0.26KB▼ 90.88%
public/images/dark-arrows.png3.67KB0.42KB▼ 88.63%
public/images/dark-bullet.png2.91KB0.22KB▼ 92.59%
public/images/light-controlpanel.png2.90KB0.23KB▼ 92.08%
public/images/no-img.png4.49KB1.16KB▼ 74.17%