62% slidedeck

Code Review | SlideDeck: Responsive WordPress Slider Plugin

WordPress plugin SlideDeck: Responsive WordPress Slider Plugin scored 62% from 54 tests.

About plugin

  • Plugin page: slidedeck
  • Plugin version: 5.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 5.8.1
  • First release: Jun 23, 2017
  • Latest release: Jan 25, 2021
  • Number of updates: 60
  • Update frequency: every 22.0 days
  • Top authors: SlideDeck (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

3,000+ active / 101,281 total downloads

Benchmarks

Plugin footprint 82% 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.85MB] [CPU: ▼128.27ms] Passed 4 tests

This is a short check of server-side resources used by SlideDeck: Responsive WordPress Slider Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.62 ▲2.8946.51 ▲22.32
Dashboard /wp-admin5.95 ▲2.8965.57 ▲14.86
Posts /wp-admin/edit.php6.00 ▲2.8964.41 ▲18.01
Add New Post /wp-admin/post-new.php8.24 ▲2.80113.83 ▼562.85
Media Library /wp-admin/upload.php5.83 ▲2.8355.01 ▲16.89

Server storage [IO: ▲6.22MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/slidedeck/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/slidedeck-lenses/.empty
Filesystem: 562 new files
Database: no new tables, 7 new options
New WordPress options
slidedeck_license
slidedeck-setup
slidedeck2_paid_installed
widget_slidedeck_widget
slidedeck2_installed
slidedeck_version
slidedeck_cohort

Browser metrics Passed 4 tests

A check of browser resources used by SlideDeck: Responsive WordPress Slider Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,003 ▲40717.64 ▲2.2518.54 ▲9.2451.61 ▼1.32
Dashboard /wp-admin3,033 ▲1025.89 ▼0.07141.11 ▼17.46154.85 ▲31.74
Posts /wp-admin/edit.php2,806 ▲672.70 ▼0.1276.26 ▲11.1694.38 ▼0.12
Add New Post /wp-admin/post-new.php1,656 ▼2718.49 ▼0.30361.85 ▼50.89111.09 ▼3.25
Media Library /wp-admin/upload.php1,818 ▲85.04 ▲0.01137.01 ▼20.56144.55 ▲19.53
Get Support /wp-admin/slidedeck.php/support260.900.059.44
Advanced Options /wp-admin/slidedeck.php/options260.900.088.36
Addons /wp-admin/slidedeck.php/addons260.900.0410.96
Templates /wp-admin/slidedeck.php/templates260.900.0411.35
Manage /wp-admin/slidedeck.php260.900.0512.18
Get More Features /wp-admin/slidedeck.php/upgrades260.900.1410.86
Lenses /wp-admin/slidedeck.php/lenses260.900.0511.95
Sources /wp-admin/slidedeck.php/sources260.900.079.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • slidedeck_version
    • slidedeck_cohort
    • slidedeck-setup
    • slidedeck_license
    • widget_slidedeck_widget
    • slidedeck2_installed
    • slidedeck2_paid_installed

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/slidedeck/views/elements/_editor-styles.php
    • > /wp-content/plugins/slidedeck/views/elements/_blog-feed.php
    • > /wp-content/plugins/slidedeck/views/elements/_ress-js-footer-part.php
    • > /wp-content/plugins/slidedeck/views/help/whats-new.php
    • > /wp-content/plugins/slidedeck/slidedeck.php
    • > /wp-content/plugins/slidedeck/views/elements/_front-cover.php
    • > /wp-content/plugins/slidedeck/views/service-request.php
    • > /wp-content/plugins/slidedeck/views/elements/_insert-iframe-table.php
    • > /wp-content/plugins/slidedeck/views/elements/_pointers.php
    • > /wp-content/plugins/slidedeck/views/_custom-css-block.php
  • 214× 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 _e() in wp-content/plugins/slidedeck/views/getcode-dialog.php:35
    • > PHP Notice
      Undefined variable: back_title in wp-content/plugins/slidedeck/views/elements/_back-cover.php on line 44
    • > PHP Notice
      Undefined variable: lens in wp-content/plugins/slidedeck/views/preview-iframe.php on line 82
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/slidedeck/classes/slidedeck-lens-upload.php on line 26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/slidedeck/sources/custom/slides/video/views/show.php on line 5
    • > PHP Warning
      Use of undefined constant SLIDEDECK_UPDATE_SITE - assumed 'SLIDEDECK_UPDATE_SITE' (this will throw an Error in a future version of PHP) in wp-content/plugins/slidedeck/views/upsells/_upsell-additional-addon-manage.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slidedeck/lib/flash.php:66
    • > PHP Notice
      Undefined variable: position in wp-content/plugins/slidedeck/views/preview-iframe.php on line 84
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/slidedeck/views/upsells/_upsell-additional-lenses.php on line 24
    • > PHP Notice
      Trying to get property 'ver' of non-object in wp-content/plugins/slidedeck/views/preview-iframe.php on line 80

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/slidedeck.php/support
    • > Network (severe)
    wp-admin/slidedeck.php/support - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php/options
    • > Network (severe)
    wp-admin/slidedeck.php/options - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php/addons
    • > Network (severe)
    wp-admin/slidedeck.php/addons - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php/templates
    • > Network (severe)
    wp-admin/slidedeck.php/templates - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php
    • > Network (severe)
    wp-admin/slidedeck.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php/upgrades
    • > Network (severe)
    wp-admin/slidedeck.php/upgrades - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php/lenses
    • > Network (severe)
    wp-admin/slidedeck.php/lenses - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck.php/sources
    • > Network (severe)
    wp-admin/slidedeck.php/sources - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: slider, wordpress slider, image slider, responsive slider

slidedeck/slidedeck.php 92% from 13 tests

The principal PHP file in "SlideDeck: Responsive WordPress Slider Plugin" v. 5.4.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/slidedeck/sources/custom/slides/image/js/Moxie.xap
      • wp-content/plugins/slidedeck/sources/custom/slides/image/js/plupload.silverlight.xap
50,750 lines of code in 248 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1135,1506,35824,411
PHP1023,9237,52616,123
CSS277132979,710
HTML1537266
JSON300192
Markdown242048

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 122)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity67.40
▷ Minimum class complexity2.00
▷ Maximum class complexity662.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity122.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods488
▷ Static methods244.92%
▷ Public methods45793.65%
▷ Protected methods20.41%
▷ Private methods295.94%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants53
▷ Global constants5196.23%
▷ Class constants23.77%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
244 PNG files occupy 1.83MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
sources/custom/slides/image/thumbnail-small.png3.01KB1.77KB▼ 41.21%
images/taxonomy-videos.png7.26KB4.23KB▼ 41.72%
images/jquery-minicolors/rainbow.png2.64KB1.74KB▼ 34.05%
lenses/tool-kit/images/arrowstyle_7.thumb.png3.22KB1.81KB▼ 43.59%
sources/custom/slides/video/thumbnail.png7.63KB4.53KB▼ 40.65%