78% sws-responsive-sliders

Code Review | SWS responsive slider

WordPress plugin SWS responsive slider scored78%from 54 tests.

About plugin

  • Plugin page: sws-responsive-sl...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 6, 2017
  • Latest release: Jan 30, 2017
  • Number of updates: 15
  • Update frequency: every 1.6 days
  • Top authors: saravan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /886 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
Install script ran successfully

Server metrics [RAM: ▼0.67MB] [CPU: ▼31.81ms] Passed 4 tests

An overview of server-side resources used by SWS responsive slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0379.98 ▼2.64
Dashboard /wp-admin3.35 ▲0.05141.89 ▲14.06
Posts /wp-admin/edit.php3.47 ▲0.11134.49 ▼7.71
Add New Post /wp-admin/post-new.php3.12 ▼2.7769.43 ▼122.35
Media Library /wp-admin/upload.php3.25 ▲0.0385.35 ▲5.48
Add New /wp-admin/post-new.php?post_type=sliders3.1171.89
All Sliders /wp-admin/edit.php?post_type=sliders3.3273.81

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SWS responsive slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲23914.55 ▲0.504.42 ▼0.1490.23 ▼7.77
Dashboard /wp-admin2,371 ▲1866.50 ▲1.56250.26 ▼5.6091.92 ▼1.45
Posts /wp-admin/edit.php2,288 ▲1963.42 ▲1.37112.20 ▼124.57111.16 ▼61.46
Add New Post /wp-admin/post-new.php1,393 ▲3316.61 ▼0.951,186.01 ▼321.1779.91 ▼13.21
Media Library /wp-admin/upload.php1,419 ▲314.25 ▲0.09168.18 ▼39.01109.10 ▼6.81
Add New /wp-admin/post-new.php?post_type=sliders1,8493.61168.70104.62
All Sliders /wp-admin/edit.php?post_type=sliders1,2613.3584.5864.61

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=sliders
    • > Notice in wp-content/plugins/sws-responsive-sliders/sws-responsive-sliders.php+238
    Undefined index: noncename_so_14445904

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sws-responsive-sliders/sws-responsive-sliders.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: slider, sliders, wordpress responsive slider, wordpress slider, easy slider...

sws-responsive-sliders/sws-responsive-sliders.php 92% from 13 tests

The main PHP file in "SWS responsive slider" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,367 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript385481906
PHP33738269
CSS24122192

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/controls.png2.74KB1.42KB▼ 48.29%