72% addi-simple-slider

Code Review | Simple Responsive Slider

WordPress plugin Simple Responsive Slider scored 72% from 54 tests.

About plugin

  • Plugin page: addi-simple-slider
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 5.9.2
  • First release: Apr 18, 2014
  • Latest release: Jun 2, 2014
  • Number of updates: 29
  • Update frequency: every 1.6 days
  • Top authors: addix (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 4,888 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
This plugin's installer ran successfully

Server metrics [RAM: ▼1.37MB] [CPU: ▼352.49ms] Passed 4 tests

A check of server-side resources used by Simple Responsive Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.07 ▼0.4417.33 ▼29.95
Dashboard /wp-admin2.99 ▼0.4216.33 ▼22.62
Posts /wp-admin/edit.php2.99 ▼0.6513.81 ▼72.82
Add New Post /wp-admin/post-new.php2.99 ▼3.9814.27 ▼1,284.55
Media Library /wp-admin/upload.php2.99 ▼0.3113.53 ▼12.98
Responsive Sliders /wp-admin/edit.php?post_type=resp_slider2.9915.11
Add New /wp-admin/post-new.php?post_type=resp_slider2.9914.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 127 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Responsive Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,175 ▲42118.42 ▲2.689.23 ▲3.072.25 ▼0.69
Dashboard /wp-admin3,186 ▲3287.62 ▲1.50146.38 ▼2.23155.39 ▼8.69
Posts /wp-admin/edit.php3,015 ▲3274.95 ▲1.7381.95 ▲15.55144.20 ▼4.94
Add New Post /wp-admin/post-new.php1,752 ▲5416.18 ▼6.11429.22 ▼2.72174.85 ▲8.20
Media Library /wp-admin/upload.php1,805 ▲1075.76 ▲0.25112.57 ▼36.78188.00 ▼3.20
Responsive Sliders /wp-admin/edit.php?post_type=resp_slider1,7134.9178.39112.21
Add New /wp-admin/post-new.php?post_type=resp_slider3,8216.42119.21141.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-post-type.php+582
    Invalid argument supplied for foreach()

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Warning in wp-includes/class-wp-post-type.php+582
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/slider.php+359
    Undefined index: ssd_slider_box_nonce
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/methods.php+194
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/methods.php+194
    Undefined offset: 1
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/methods.php+194
    Undefined offset: 2
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/methods.php+194
    Undefined offset: 3
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/methods.php+194
    Undefined offset: 4
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Notice in wp-content/plugins/addi-simple-slider/methods.php+262
    Undefined variable: html

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/addi-simple-slider/slider.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Network (severe)
    wp-content/plugins/addi-simple-slider/codemirror-3.22/theme/xg-dark.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=resp_slider
    • > Network (severe)
    wp-content/plugins/addi-simple-slider/codemirror-3.22/theme/xg-light.css?ver=5.9.2 - 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 uses markdown syntax to describe your plugin to the world
4 plugin tags: responsiveslides, simple slider, jquery, slider

addi-simple-slider/slider.php 92% from 13 tests

The main PHP file in "Simple Responsive Slider" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("addi-simple-slider.php" instead of "slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin14,120 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript631,33974611,313
CSS403521591,595
HTML5881600
PHP314270504
Markdown218065
JSON20035
Bourne Shell1015
YAML1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.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
There are no PNG files in this plugin