88% swish-slider-lite

Code Review | Swish Slider

WordPress plugin Swish Slider scored 88% from 54 tests.

About plugin

  • Plugin page: swish-slider-lite
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2.1
  • WordPress version: 5.9.2
  • First release: Sep 10, 2018
  • Latest release: May 23, 2019
  • Number of updates: 22
  • Update frequency: every 11.6 days
  • Top authors: southdevondigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 477 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼297.35ms] Passed 4 tests

Server-side resources used by Swish Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.4256.49 ▲26.95
Dashboard /wp-admin3.44 ▲0.0331.94 ▼1.92
Posts /wp-admin/edit.php3.66 ▲0.0234.94 ▼2.08
Add New Post /wp-admin/post-new.php6.90 ▼0.0791.86 ▼1,182.94
Media Library /wp-admin/upload.php3.31 ▲0.0222.31 ▼2.45
Add New /wp-admin/post-new.php?post_type=swish-slider3.6142.50
All Sliders /wp-admin/edit.php?post_type=swish-slider3.3526.26

Server storage [IO: ▲0.09MB] [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: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Swish Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,824 ▲6616.01 ▲0.095.96 ▼2.442.12 ▼0.77
Dashboard /wp-admin2,927 ▲696.15 ▼0.07117.90 ▼19.60152.19 ▼15.50
Posts /wp-admin/edit.php2,726 ▲413.24 ▲0.0162.18 ▼2.02134.02 ▼12.20
Add New Post /wp-admin/post-new.php1,691 ▼2018.09 ▼2.74433.14 ▲4.29155.65 ▲0.11
Media Library /wp-admin/upload.php1,733 ▲355.46 ▼0.06138.31 ▼8.06188.97 ▼8.52
Add New /wp-admin/post-new.php?post_type=swish-slider2,92911.44223.56197.45
All Sliders /wp-admin/edit.php?post_type=swish-slider1,3993.1657.16109.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/swish-slider-lite/swish-slider.php:50

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=swish-slider
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/swish-slider-lite/scripts/admin-script.js?ver=5.9.2:117:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=swish-slider
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31702 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: tocuh, responsive, swipe, mobile, slider

swish-slider-lite/swish-slider.php 77% from 13 tests

"Swish Slider" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("swish-slider-lite.php" instead of "swish-slider.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 310 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin953 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP13120367
CSS8589306
JavaScript26341280

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected