78% ays-slider

Code Review | Image Slider by Ays- Responsive Slider and Carousel

WordPress plugin Image Slider by Ays- Responsive Slider and Carousel scored78%from 54 tests.

About plugin

  • Plugin page: ays-slider
  • Plugin version: 2.6.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 172
  • Update frequency: every 16.3 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▼1.77ms] Passed 4 tests

A check of server-side resources used by Image Slider by Ays- Responsive Slider and Carousel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3538.69 ▼4.67
Dashboard /wp-admin3.76 ▲0.4650.99 ▲4.11
Posts /wp-admin/edit.php3.80 ▲0.4451.12 ▲5.17
Add New Post /wp-admin/post-new.php6.39 ▲0.5089.38 ▼10.12
Media Library /wp-admin/upload.php3.64 ▲0.4138.59 ▲3.62
Ays Slider /wp-admin/options-general.php?page=ays-slider3.7442.63

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: 1 new table, 9 new options
New tables
wp_ays_slider
New WordPress options
ays_slider_db_version
widget_recent-posts
can_compress_scripts
ays_slider_sale_btn
db_upgraded
widget_theysaidso_widget
widget_recent-comments
ays_slider_banner_time
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Image Slider by Ays- Responsive Slider and Carousel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7714.22 ▼0.501.61 ▼0.0937.19 ▼8.00
Dashboard /wp-admin2,242 ▲655.52 ▼0.0691.14 ▼8.5881.62 ▲32.40
Posts /wp-admin/edit.php2,144 ▲411.99 ▼0.0141.41 ▲6.7937.05 ▲0.87
Add New Post /wp-admin/post-new.php1,567 ▲4123.25 ▲0.29695.69 ▲40.3851.67 ▼7.83
Media Library /wp-admin/upload.php1,450 ▲504.15 ▼0.0593.29 ▼14.0872.98 ▲27.50
Ays Slider /wp-admin/options-general.php?page=ays-slider1,8086.58129.26181.21

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • ays_slider_sale_btn
    • ays_slider_banner_time

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ays-slider/public/partials/ays-slider-public-display.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ays-slider/admin/partials/actions/ays-slider-admin-actions.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ays-slider/widgets/ays-slider-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ays-slider/admin/partials/ays-slider-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/ays-slider/includes/lists/class-ays-slider-list-table.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #7 (Ays image slider - admin preview) image required
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Image Slider by Ays- Responsive Slider and Carousel" version 2.6.5
53 characters long description:
Create Beautifull And Responsive Sliders With Effects

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,509 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP164058292,764
CSS144043242,013
JavaScript127797655
SVG40077

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity29.78
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods66
▷ Static methods710.61%
▷ Public methods6192.42%
▷ Protected methods00.00%
▷ Private methods57.58%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.66MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/winter-backround-bundle.png195.70KB95.87KB▼ 51.01%
admin/images/huge_bundle_logo.png11.52KB4.06KB▼ 64.79%
admin/images/ays_pro.png18.67KB4.33KB▼ 76.82%
admin/images/black_friday_greate_bundle.png10.00KB10.02KB0.00%
admin/images/winter_bundle_logo_background_2.png357.75KB171.13KB▼ 52.16%