61% slidedeck2

Code Review | SlideDeck 2 Lite Responsive Content Slider

WordPress plugin SlideDeck 2 Lite Responsive Content Slider scored 61% from 54 tests.

About plugin

  • Plugin page: slidedeck2
  • Plugin version: 2.3.21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5
  • WordPress version: 5.9.2
  • First release: Jun 28, 2012
  • Latest release: Sep 12, 2017
  • Number of updates: 139
  • Update frequency: every 13.7 days
  • Top authors: dtelepathy (47.48%)oriontimbers (15.83%)SlideDeck (14.39%)jamie3d (10.79%)WPEka Club (5.04%)

Code review

54 tests

User reviews

23 reviews

Install metrics

2,000+ active / 339,549 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼2.00MB] [CPU: ▼339.72ms] Passed 4 tests

A check of server-side resources used by SlideDeck 2 Lite Responsive Content Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.37 ▼1.147.67 ▼44.85
Dashboard /wp-admin2.39 ▼1.028.22 ▼26.07
Posts /wp-admin/edit.php2.39 ▼1.258.21 ▼28.16
Add New Post /wp-admin/post-new.php2.38 ▼4.587.52 ▼1,259.81
Media Library /wp-admin/upload.php2.39 ▼0.906.18 ▼17.43

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

Filesystem and database footprint
Please fix the following
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/slidedeck2/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/slidedeck-lenses/.empty
Filesystem: 409 new files
Database: no new tables, 7 new options
New WordPress options
slidedeck_cohort
widget_slidedeck2_widget
slidedeck_version
slidedeck_partner
slidedeck2_lite_installed
slidedeck_license
slidedeck2_installed

Browser metrics Passed 4 tests

Checking browser requirements for SlideDeck 2 Lite Responsive Content Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,027 ▲27317.85 ▲2.1822.15 ▲16.062.33 ▼0.43
Dashboard /wp-admin2,939 ▲786.01 ▼0.15115.35 ▼22.19177.63 ▲5.78
Posts /wp-admin/edit.php2,741 ▲503.14 ▼0.0963.08 ▼1.22140.69 ▼13.09
Add New Post /wp-admin/post-new.php1,697 ▲915.43 ▼4.32413.84 ▲23.41158.27 ▼1.49
Media Library /wp-admin/upload.php1,744 ▲465.50 ▼0.03122.23 ▼25.36199.16 ▲14.57
Manage /wp-admin/slidedeck2-lite.php260.940.0320.24
Lenses /wp-admin/slidedeck2-lite.php/lenses260.940.0315.15
Advanced Options /wp-admin/slidedeck2-lite.php/options260.940.0714.85
Get More Features /wp-admin/slidedeck2-lite.php/upgrades260.940.0514.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in SlideDeck2Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • slidedeck_cohort
    • slidedeck2_installed
    • slidedeck_license
    • slidedeck2_lite_installed
    • widget_slidedeck2_widget
    • slidedeck_version
    • slidedeck_partner

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/slidedeck2/views/elements/_blog-feed.php
    • > /wp-content/plugins/slidedeck2/views/elements/_editor-styles.php
    • > /wp-content/plugins/slidedeck2/views/help/whats-new.php
    • > /wp-content/plugins/slidedeck2/views/elements/_upgrade_button.php
    • > /wp-content/plugins/slidedeck2/views/elements/_insert-iframe-table.php
    • > /wp-content/plugins/slidedeck2/views/elements/_pointers.php
    • > /wp-content/plugins/slidedeck2/views/elements/_ress-js-footer-part.php
    • > /wp-content/plugins/slidedeck2/views/elements/_latest-tweets.php
  • 135× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/slidedeck2/views/elements/_lens.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slidedeck2/views/elements/_source-modal.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slidedeck2/views/elements/_manage-table.php:94
    • > PHP Notice
      Undefined variable: can_edit_lenses in wp-content/plugins/slidedeck2/views/elements/_lens.php on line 37
    • > PHP Notice
      Undefined variable: wp_styles in wp-content/plugins/slidedeck2/views/preview-iframe.php on line 78
    • > PHP Fatal error
      Uncaught Error: Class 'SlideDeck' not found in wp-content/plugins/slidedeck2/sources/flickr/source.php:2
    • > PHP Warning
      Use of undefined constant SLIDEDECK2_URLPATH - assumed 'SLIDEDECK2_URLPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/slidedeck2/views/elements/_editor-styles.php on line 35
    • > PHP Notice
      Undefined variable: values in wp-content/plugins/slidedeck2/views/elements/_upgrade_button.php on line 2
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/slidedeck2/views/upsells/_upsell-additional-lens-manage.php on line 25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/slidedeck2/views/elements/_upgrade_button.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)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/slidedeck2-lite.php
    • > Network (severe)
    wp-admin/slidedeck2-lite.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck2-lite.php/lenses
    • > Network (severe)
    wp-admin/slidedeck2-lite.php/lenses - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck2-lite.php/options
    • > Network (severe)
    wp-admin/slidedeck2-lite.php/options - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/slidedeck2-lite.php/upgrades
    • > Network (severe)
    wp-admin/slidedeck2-lite.php/upgrades - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 34 tag instead of maximum 10
Please take inspiration from this readme.txt

slidedeck2/slidedeck2-lite.php 85% from 13 tests

The main PHP file in "SlideDeck 2 Lite Responsive Content Slider" ver. 2.3.21 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("slidedeck2.php" instead of "slidedeck2-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected29,631 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
CSS1639144611,397
PHP722,4044,7939,712
JavaScript381,7441,6328,034
HTML1537266
JSON300174
Markdown242048

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity69.63
▷ Minimum class complexity2.00
▷ Maximum class complexity462.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods312
▷ Static methods206.41%
▷ Public methods29494.23%
▷ Protected methods20.64%
▷ Private methods165.13%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants26100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
228 PNG files occupy 3.37MB with 1.78MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gplus-how-to/step1.png6.17KB5.30KB▼ 14.19%
images/lens-thumbnail-shadow.png1.27KB0.61KB▼ 52.11%
images/icon-delete-lens.png1.17KB0.29KB▼ 74.77%
lenses/tool-kit/images/arrowstyle_2-sml.png1.62KB0.71KB▼ 56.33%
images/addons/check-no-sprite.png1.62KB0.54KB▼ 66.47%