67% yoo-slider

Code Review | Yoo Slider - Image Slider & Video Slider

WordPress plugin Yoo Slider - Image Slider & Video Slider scored67%from 54 tests.

About plugin

  • Plugin page: yoo-slider
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 9, 2019
  • Latest release: Apr 18, 2022
  • Number of updates: 97
  • Update frequency: every 10.1 days
  • Top authors: yooslider (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

1,000+ active /33,780 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▼6.85ms] 75% from 4 tests

Analyzing server-side resources used by Yoo Slider - Image Slider & Video Slider
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 502.77ms on /wp-admin/admin.php?page=yooslider-templates)
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6343.92 ▲5.60
Dashboard /wp-admin3.97 ▲0.6249.76 ▼10.96
Posts /wp-admin/edit.php4.01 ▲0.6545.10 ▼1.76
Add New Post /wp-admin/post-new.php6.67 ▲0.7875.13 ▼20.28
Media Library /wp-admin/upload.php3.92 ▲0.6941.29 ▲7.70
Templates /wp-admin/admin.php?page=yooslider-templates4.01502.77
Sliders /wp-admin/admin.php?page=yooslider4.0538.85

Server storage [IO: ▲2.48MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 142 new files
Database: 2 new tables, 8 new options
New tables
wp_gks_slides
wp_gks_sliders
New WordPress options
gks_banners_last_loaded_at
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
gks_banners_content
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Yoo Slider - Image Slider & Video Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22913.92 ▼0.717.96 ▲6.4041.21 ▼0.91
Dashboard /wp-admin2,265 ▲885.85 ▲0.1982.99 ▼3.2238.30 ▼3.84
Posts /wp-admin/edit.php2,172 ▲752.39 ▲0.4136.06 ▲0.6332.82 ▼2.34
Add New Post /wp-admin/post-new.php6,262 ▲4,73619.19 ▼4.45922.96 ▲230.0136.93 ▼21.58
Media Library /wp-admin/upload.php1,467 ▲674.53 ▲0.2398.48 ▼10.5144.09 ▼2.18
Templates /wp-admin/admin.php?page=yooslider-templates1,6205.0678.16184.68
Sliders /wp-admin/admin.php?page=yooslider1,4945.1254.6387.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_gks_slides
    • wp_gks_sliders
  • Zombie WordPress options detected upon uninstall: 8 options
    • gks_banners_last_loaded_at
    • db_upgraded
    • gks_banners_content
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/yoo-slider/views/admin/gks-admin-templates-btn.php
    • > /wp-content/plugins/yoo-slider/views/admin/gks-admin-dialogs.php
    • > /wp-content/plugins/yoo-slider/views/admin/gks-admin-slider.php
    • > /wp-content/plugins/yoo-slider/views/admin/gks-admin-modal-spinner.php
  • 49× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(GKS_CLASSES_DIR_PATH/GKSLicenseCore.php): failed to open stream: No such file or directory in wp-content/plugins/yoo-slider/classes/GKSLicenseManager.php on line 3
    • > PHP Warning
      include_once(GKS_ADMIN_VIEWS_DIR_PATH/gks-header-banner.php): failed to open stream: No such file or directory in wp-content/plugins/yoo-slider/views/admin/gks-admin.php on line 5
    • > PHP Warning
      Use of undefined constant GKS_PKG_TYPE - assumed 'GKS_PKG_TYPE' (this will throw an Error in a future version of PHP) in wp-content/plugins/yoo-slider/views/front/layouts/gks-front-slider.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/yoo-slider/gks-config.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'GKS_CLASSES_DIR_PATH/GKSLicenseCore.php' (include_path='.:/usr/share/php') in wp-content/plugins/yoo-slider/classes/GKSLicenseManagerRecurring.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'GKS_CLASSES_DIR_PATH/GKSLicenseCore.php' (include_path='.:/usr/share/php') in wp-content/plugins/yoo-slider/classes/GKSLicenseManager.php on line 3
    • > PHP Warning
      Use of undefined constant GKS_CLASSES_DIR_PATH - assumed 'GKS_CLASSES_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/yoo-slider/classes/GKSLicenseManagerRecurring.php on line 3
    • > PHP Warning
      Use of undefined constant GKS_PKG_TYPE - assumed 'GKS_PKG_TYPE' (this will throw an Error in a future version of PHP) in wp-content/plugins/yoo-slider/views/admin/gks-admin-slider.php on line 75
    • > PHP Warning
      require_once(GKS_CLASSES_DIR_PATH/GKSDashboardListTable.php): failed to open stream: No such file or directory in wp-content/plugins/yoo-slider/views/admin/gks-admin-dashboard.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/yoo-slider/classes/GKSDashboardListTable.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #2 (Slider with caption and pagination), #3 (Slider with few customizations), #4 (Carousel slider with hover captions), #5 (Multicolumn carousel slider), #6 (Slider with thumbnails control), #7 (Embedded sliders), #8 (Coverflow slider), #9 (Clients logos carousel slider), #10 (Auto slide logos presentation), #11 (Sliders list dashboard screen), #12 (Slide composing screen), #13 (Slider settings screen)
The official readme.txt might help

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

"Yoo Slider - Image Slider & Video Slider" version 2.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
126 characters long description:
The most powerful WordPress slider plugin ever! Slide your images, videos or any html content on your website with few clicks.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected24,556 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
CSS201,61219711,029
PHP221,2443357,158
JavaScript171,3181,7765,791
SVG300578

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.89
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity5.86
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes3782.22%
▷ Concrete classes817.78%
▷ Final classes00.00%
Methods74
▷ Static methods3648.65%
▷ Public methods7195.95%
▷ Protected methods11.35%
▷ Private methods22.70%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants665
▷ Global constants507.52%
▷ Class constants61592.48%
▷ Public constants615100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
63 PNG files occupy 0.69MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/admin/block_icon.png15.38KB6.57KB▼ 57.29%
images/admin/layouts/layout-masonry_dark.png16.33KB0.25KB▼ 98.46%
images/general/icons/tick-icon-2.png0.99KB1.21KB0.00%
images/general/icons/tick-icon-3.png8.83KB3.70KB▼ 58.15%
images/general/icons/save-icon-1.png0.61KB0.54KB▼ 11.61%