93% jssor-slider

Code Review | Jssor Slider by jssor.com

WordPress plugin Jssor Slider by jssor.com scored 93% from 54 tests.

About plugin

  • Plugin page: jssor-slider
  • Plugin version: 3.1.24
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.0.2
  • WordPress version: 5.8.1
  • First release: Apr 29, 2017
  • Latest release: Jan 15, 2019
  • Number of updates: 137
  • Update frequency: every 11.2 days
  • Top authors: jssor (84.67%)PhPCentre (16.06%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active / 23,069 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼137.76ms] Passed 4 tests

This is a short check of server-side resources used by Jssor Slider by jssor.com
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0232.53 ▲4.96
Dashboard /wp-admin3.10 ▲0.0446.29 ▲0.69
Posts /wp-admin/edit.php3.21 ▲0.1046.32 ▲1.35
Add New Post /wp-admin/post-new.php5.46 ▲0.0293.30 ▼553.28
Media Library /wp-admin/upload.php3.04 ▲0.0433.26 ▲0.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 406 new files
Database: 2 new tables, 2 new options
New tables
wp_jssor_slider_trans
wp_jssor_slider_sliders
New WordPress options
wp_jssor_slider_db_version
wp_jssor_slider_instance_id

Browser metrics Passed 4 tests

Jssor Slider by jssor.com: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲12516.22 ▲0.5210.01 ▲1.5351.76 ▲0.96
Dashboard /wp-admin2,979 ▲485.92 ▼0.02132.94 ▼5.13132.89 ▲25.10
Posts /wp-admin/edit.php2,770 ▲312.72 ▼0.0059.02 ▼6.2890.28 ▲0.09
Add New Post /wp-admin/post-new.php1,685 ▲918.81 ▼0.12377.84 ▼14.63110.59 ▲2.33
Media Library /wp-admin/upload.php1,844 ▲375.03 ▼0.02127.62 ▼28.61134.07 ▲20.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jssor-slider/includes/models/runtime-document/class-wjssl-caption-slideo-options.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Tags: You are using too many tags: 31 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #5 (Maintanence)
The official readme.txt is a good inspiration

jssor-slider/jssor-slider.php Passed 13 tests

The primary PHP file in "Jssor Slider by jssor.com" version 3.1.24 is used by WordPress to initiate all plugin functionality
90 characters long description:
Touch swipe responsive image/content slider/slideshow/carousel/gallery/banner by jssor.com

Code Analysis 97% from 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
No dangerous file extensions were detected26,462 lines of code in 279 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript611213,526
PHP1263,0543,58411,739
HTML1383411,047
SVG747148
CSS2002

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.29
▷ Minimum class complexity1.00
▷ Maximum class complexity291.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes148
▷ Abstract classes85.41%
▷ Concrete classes14094.59%
▷ Final classes00.00%
Methods646
▷ Static methods18228.17%
▷ Public methods48575.08%
▷ Protected methods335.11%
▷ Private methods12819.81%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants159
▷ Global constants116.92%
▷ Class constants14893.08%
▷ Public constants148100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
interface/admin/images/purchase-code.png0.98KB0.48KB▼ 50.95%
public/content/slideo.editor/img/sprite-slideo-1.6.png17.75KB6.05KB▼ 65.93%
interface/admin/images/dash-notregistered.png0.41KB0.44KB0.00%
interface/admin/images/sprite-jssor-slider.png3.98KB2.49KB▼ 37.61%
interface/admin/images/trans_tile.png0.08KB0.09KB0.00%