72% wc-products-slider

Code Review | WooCommerce Advanced Slider - 3D slider for Product & Category

WordPress plugin WooCommerce Advanced Slider - 3D slider for Product & Category scored72%from 54 tests.

About plugin

  • Plugin page: wc-products-slider
  • Plugin version: 1.1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.0.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2020
  • Latest release: Oct 30, 2022
  • Number of updates: 19
  • Update frequency: every 52.3 days
  • Top authors: innovs (57.89%)cscode (47.37%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,927 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼5.95ms] Passed 4 tests

Server-side resources used by WooCommerce Advanced Slider - 3D slider for Product & Category
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2540.00 ▼0.06
Dashboard /wp-admin3.62 ▲0.2746.69 ▼17.32
Posts /wp-admin/edit.php3.74 ▲0.3848.73 ▲4.98
Add New Post /wp-admin/post-new.php6.22 ▲0.3386.34 ▼7.68
Media Library /wp-admin/upload.php3.55 ▲0.3237.17 ▲1.26
/wp-admin/admin.php?page=wcps_slider_three3.5634.72
/wp-admin/admin.php?page=wcps_slider_two3.5633.21
/wp-admin/admin.php?page=wcps_slider_four3.5631.85
/wp-admin/admin.php?page=wcps_slider_one3.5632.28
/wp-admin/admin.php?page=wcps_slider_five3.5636.92
/wp-admin/admin.php?page=wcps_category_slider3.5433.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 92 new files
Database: no new tables, 88 new options
New WordPress options
wcps_show_atcb_2
wcps_vb_text_2
wcps_vb_text_3
wcps_pp_hover_3
wcps_show_vmb_3
wcps_show_pp_2
wcps_how_many_category
wcps_pt_color_2
wcps_pt_size_4
wcps_show_pt_3
...

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Advanced Slider - 3D slider for Product & Category
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,047 ▲30114.25 ▼0.307.74 ▲6.0439.86 ▼3.71
Dashboard /wp-admin2,262 ▲855.64 ▲0.11100.98 ▲5.5148.66 ▲5.90
Posts /wp-admin/edit.php2,170 ▲702.60 ▲0.6644.89 ▲9.4445.25 ▲10.41
Add New Post /wp-admin/post-new.php1,582 ▲5623.75 ▲0.72730.40 ▲84.3942.02 ▼19.63
Media Library /wp-admin/upload.php1,464 ▲615.02 ▲0.84111.59 ▲15.7550.81 ▲9.40
/wp-admin/admin.php?page=wcps_slider_three2,5624.29110.8542.93
/wp-admin/admin.php?page=wcps_slider_two2,5654.2997.4835.96
/wp-admin/admin.php?page=wcps_slider_four2,5654.3098.2837.49
/wp-admin/admin.php?page=wcps_slider_one2,5664.3899.1338.16
/wp-admin/admin.php?page=wcps_slider_five2,5394.2598.0336.43
/wp-admin/admin.php?page=wcps_category_slider1,0752.1629.5630.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 88 options in the database
    • wcps_vmb_color_1
    • can_compress_scripts
    • wcps_pp_hover_1
    • wcps_show_vmb_1
    • wcps_pp_color_3
    • wcps_pp_color_2
    • wcps_atcb_hover_3
    • wcps_show_pp_4
    • wcps_vmb_hover_2
    • wcps_atcb_bg_hover_2
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wcps_slider_one
    • > Notice in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-one.php+87
    Undefined variable: wcps_pt_none
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wcps_slider_one
    • > Notice in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-one.php+159
    Undefined variable: wcps_pp_none
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wcps_slider_one
    • > Notice in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-one.php+192
    Undefined variable: wcps_atcb_none

SRP 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-products-slider/admin/partials/part/wcps-foot.php
    • > /wp-content/plugins/wc-products-slider/admin/partials/wcps-admin-display.php
    • > /wp-content/plugins/wc-products-slider/public/partials/wcps-public-display.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-three.php:4
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/wc-products-slider/admin/partials/part/wcps-head.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wc-products-slider/admin/partials/part/wcps-head.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wc-products-slider/public/class-wcps-public.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-one.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-setting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-four.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-products-slider/admin/partials/wcps-category-slider.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-five.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-products-slider/admin/partials/wcps-slider-dashboard.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #6, #7, #8 in wc-products-slider/assets to your readme.txt
The official readme.txt might help

wc-products-slider/wcps.php 92% from 13 tests

"WooCommerce Advanced Slider - 3D slider for Product & Category" version 1.1.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-products-slider.php" instead of "wcps.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
Good job! No executable or dangerous file extensions detected13,874 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
SVG40129,207
PHP237186022,877
CSS1251731,020
JavaScript10211118770

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.38
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.07
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods37.32%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
9 PNG files occupy 1.87MB with 1.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/p_slider_3.png172.05KB60.46KB▼ 64.86%
admin/img/p_slider_1.png201.71KB68.08KB▼ 66.25%
public/img/arrows.png2.23KB0.88KB▼ 60.33%
admin/img/slider_1.png324.66KB102.00KB▼ 68.58%
public/img/browser.png12.17KB5.03KB▼ 58.64%