99% clean-slider

Code Review | Clean Slider for Wordpress

WordPress plugin Clean Slider for Wordpress scored 99% from 54 tests.

About plugin

  • Plugin page: clean-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 5.9.2
  • First release: Aug 19, 2015
  • Latest release: Aug 20, 2015
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: faxogen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 873 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Clean Slider for Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0257.19 ▼40.27
Dashboard /wp-admin3.43 ▲0.0232.46 ▼2.04
Posts /wp-admin/edit.php3.65 ▲0.0237.42 ▲2.74
Add New Post /wp-admin/post-new.php6.92 ▼0.0893.88 ▼1,168.60
Media Library /wp-admin/upload.php3.31 ▲0.0123.98 ▲1.61

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: 2 new tables, no new options
New tables
wp_clean_slides_vava
wp_clean_images_vava

Browser metrics Passed 4 tests

A check of browser resources used by Clean Slider for Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,917 ▲17516.36 ▲0.588.78 ▲3.072.94 ▲0.78
Dashboard /wp-admin2,904 ▲436.12 ▼0.09116.40 ▼19.01154.84 ▼11.92
Posts /wp-admin/edit.php2,703 ▲183.24 ▲0.0061.61 ▼2.01134.74 ▼7.40
Add New Post /wp-admin/post-new.php1,678 ▲1718.08 ▲2.11398.29 ▼7.97155.73 ▼0.27
Media Library /wp-admin/upload.php1,716 ▲185.51 ▼0.02139.28 ▼2.52181.35 ▲0.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Slides listing), #2 (Editing slider defaults), #3 (Viewing slider images), #4 (Adding new image to slider), #5 (Editing image)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === clean-slider === )
The official readme.txt is a good inspiration

clean-slider/clean_slider_vahid.php 92% from 13 tests

The main file in "Clean Slider for Wordpress" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("clean-slider.php" instead of "clean_slider_vahid.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,293 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP63831122,241
SVG1011,181
CSS14810657
JavaScript264100214

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity159.00
▷ Minimum class complexity159.00
▷ Maximum class complexity159.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods715.91%
▷ Protected methods3681.82%
▷ Private methods12.27%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png11.42KB10.88KB▼ 4.80%
assets/icon-128x128.png5.56KB5.31KB▼ 4.53%