73% slider-options

Code Review | Slider Options - Manager jQuery Slider

WordPress plugin Slider Options - Manager jQuery Slider scored 73% from 54 tests.

About plugin

  • Plugin page: slider-options
  • Plugin version: 1.1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Dec 27, 2015
  • Number of updates: 63
  • Update frequency: every 0.6 days
  • Top authors: SimonJan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,703 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.24ms] Passed 4 tests

A check of server-side resources used by Slider Options - Manager jQuery Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.57 ▼2.35
Dashboard /wp-admin3.48 ▲0.1846.24 ▼5.01
Posts /wp-admin/edit.php3.52 ▲0.1650.51 ▲0.92
Add New Post /wp-admin/post-new.php6.02 ▲0.1399.01 ▲1.49
Media Library /wp-admin/upload.php3.33 ▲0.1139.25 ▲4.53
New Slider /wp-admin/admin.php?page=sm-slider&action=add-new3.3635.31
Settings /wp-admin/admin.php?page=sm-slider&action=config3.3633.78
SM Slider /wp-admin/admin.php?page=sm-slider3.3736.29

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 106 new files
Database: 1 new table, 14 new options
New tables
wp_sm_sliders
New WordPress options
-smsd_bootstrap
widget_recent-comments
widget_recent-posts
can_compress_scripts
-smsd_type
-smsd_types
-smsd_manager
-smsd_settings
-smsd_version
-smsd_flexslider
...

Browser metrics Passed 4 tests

Checking browser requirements for Slider Options - Manager jQuery Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19213.95 ▼0.268.55 ▲6.8654.44 ▲8.90
Dashboard /wp-admin2,238 ▲505.88 ▲0.9896.31 ▼19.4772.36 ▲24.02
Posts /wp-admin/edit.php2,130 ▲412.02 ▲0.0138.91 ▼0.1334.36 ▼0.12
Add New Post /wp-admin/post-new.php1,544 ▲1017.75 ▼5.41664.83 ▼20.6464.05 ▲12.35
Media Library /wp-admin/upload.php1,423 ▲354.24 ▼0.0597.12 ▼13.8674.82 ▲31.26
New Slider /wp-admin/admin.php?page=sm-slider&action=add-new1,5022.4542.4656.02
Settings /wp-admin/admin.php?page=sm-slider&action=config1,6542.3243.9835.59
SM Slider /wp-admin/admin.php?page=sm-slider1,0802.1430.3828.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_sm_sliders
  • Zombie WordPress options were found after uninstall: 14 options
    • -smsd_settings
    • db_upgraded
    • -smsd_flexslider
    • widget_recent-posts
    • -smsd_type
    • widget_recent-comments
    • -smsd_size
    • -smsd_types
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/slider-options/views/temp-active-slider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-options/views/add-new-slider.php:3
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/slider-options/views/temp-standard-slider.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-options/views/temp-video-smsd.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-options/views/temp-image-smsd.php:3
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/slider-options/views/temp-active-slider.php on line 1
    • > PHP Notice
      Undefined variable: sm_post in wp-content/plugins/slider-options/views/temp-image-smsd.php on line 3
    • > PHP Notice
      Undefined variable: post_details in wp-content/plugins/slider-options/views/temp-image-smsd.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-options/includes/func.smslider-helper.php:19
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/slider-options/views/hidden-form.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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: There are too many tags (112 tag instead of maximum 10)
Please take inspiration from this readme.txt

slider-options/smslider.php 85% from 13 tests

The main PHP script in "Slider Options - Manager jQuery Slider" version 1.1.2.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("slider-options.php" instead of "smslider.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)

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
Success! There were no dangerous files found in this plugin13,928 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
CSS1755927,927
PHP203164932,448
JavaScript146583802,072
Markdown736201,168
SVG200307
JSON6006

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.31
Average class complexity50.50
▷ Minimum class complexity12.00
▷ Maximum class complexity171.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods111
▷ Static methods3228.83%
▷ Public methods7365.77%
▷ Protected methods32.70%
▷ Private methods3531.53%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/libs/bxslider/images/controls.png2.74KB1.42KB▼ 48.29%
assets/libs/nivoslider/themes/default/bullets.png1.25KB1.08KB▼ 13.74%
assets/libs/flexslider/images/bg_play_pause.png1.51KB0.52KB▼ 65.52%
assets/libs/nivoslider/themes/light/bullets.png3.21KB0.54KB▼ 83.24%
assets/libs/nivoslider/themes/dark/bullets.png3.07KB0.42KB▼ 86.27%