83% several-images-slider-widget

Code Review | Several Images Slider Widget

WordPress plugin Several Images Slider Widget scored83%from 54 tests.

About plugin

  • Plugin page: several-images-sl...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 11, 2018
  • Latest release: Nov 4, 2022
  • Number of updates: 14
  • Update frequency: every 112.9 days
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,271 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.56ms] Passed 4 tests

This is a short check of server-side resources used by Several Images Slider Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0338.65 ▼3.50
Dashboard /wp-admin3.32 ▲0.0143.89 ▼1.31
Posts /wp-admin/edit.php3.37 ▲0.0146.26 ▼2.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.28 ▼10.99
Media Library /wp-admin/upload.php3.24 ▲0.0138.30 ▲2.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
sisw_gwl_version
theysaidso_admin_options
widget_sisw_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Several Images Slider Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17813.94 ▼0.308.42 ▲6.4238.36 ▼9.30
Dashboard /wp-admin2,200 ▲125.77 ▲0.8898.34 ▼4.9038.84 ▼6.52
Posts /wp-admin/edit.php2,089 ▼31.99 ▲0.0140.76 ▲0.0835.93 ▼3.20
Add New Post /wp-admin/post-new.php1,519 ▼2323.38 ▲5.13699.63 ▲65.6557.14 ▲4.59
Media Library /wp-admin/upload.php1,382 ▼64.23 ▲0.0497.89 ▼2.0340.29 ▼2.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • sisw_gwl_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_sisw_widget
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/several-images-slider-widget/main.php
    • > /wp-content/plugins/several-images-slider-widget/includes/image_widget.php

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 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid version format
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

several-images-slider-widget/main.php 77% from 13 tests

The entry point to "Several Images Slider Widget" version 2.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("several-images-slider-widget.php" instead of "main.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 254 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,766 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35179692,123
PHP34328364
CSS4817279

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity28.50
▷ Minimum class complexity3.00
▷ Maximum class complexity54.00
Average method complexity8.86
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/drag_icon.png0.27KB0.30KB0.00%