78% tc-woocommerce-product-slider

Code Review | WooCommerce Product Slider

WordPress plugin WooCommerce Product Slider scored78%from 54 tests.

About plugin

  • Plugin page: tc-woocommerce-pr...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2016
  • Latest release: May 19, 2019
  • Number of updates: 94
  • Update frequency: every 12.5 days
  • Top authors: imranemu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /27,020 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.66ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Product Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.06 ▼0.95
Dashboard /wp-admin3.42 ▲0.1251.76 ▼1.16
Posts /wp-admin/edit.php3.53 ▲0.1860.90 ▲15.93
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.37 ▼8.84
Media Library /wp-admin/upload.php3.32 ▲0.0935.78 ▲0.33
Help & Upgrade /wp-admin/admin.php?page=tc_wps_carousel_menu_help3.3533.49
TC WPS /wp-admin/admin.php?page=tc-whooslider3.3247.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
tc_whooslider_styling
widget_recent-comments
tc_whooslider_showhide
widget_recent-posts
tc_whooslider_advanced
theysaidso_admin_options
tc_whooslider_basics
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Product Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,084 ▲32314.96 ▲0.615.80 ▲4.2143.08 ▲3.36
Dashboard /wp-admin2,358 ▲1786.29 ▲0.76113.28 ▲16.4088.72 ▲46.48
Posts /wp-admin/edit.php2,301 ▲2043.50 ▲1.4754.89 ▲19.6180.22 ▲41.24
Add New Post /wp-admin/post-new.php1,559 ▲3323.06 ▲0.07676.26 ▼12.44121.22 ▲61.33
Media Library /wp-admin/upload.php1,441 ▲414.24 ▲0.0386.00 ▼16.6289.40 ▲43.70
Help & Upgrade /wp-admin/admin.php?page=tc_wps_carousel_menu_help1,77210.05295.75126.96
TC WPS /wp-admin/admin.php?page=tc-whooslider3,0074.16119.4475.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • tc_whooslider_basics
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • tc_whooslider_advanced
    • tc_whooslider_styling
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • tc_whooslider_showhide

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tc-woocommerce-product-slider/lib/tc-help-upgrade.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tc-woocommerce-product-slider/tc-woocommerce-product-slider.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tc-woocommerce-product-slider/public/view.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tc-woocommerce-product-slider/public/featured-view.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (22 tag instead of maximum 10)
You can take inspiration from this readme.txt

tc-woocommerce-product-slider/tc-woocommerce-product-slider.php 85% from 13 tests

"WooCommerce Product Slider" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 387 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin3,978 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24508571,764
PHP73162361,108
CSS8115821,036
Markdown138070

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity26.00
▷ Minimum class complexity3.00
▷ Maximum class complexity49.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendors/owl-carousel/grabbing.png0.11KB0.14KB0.00%
assets/images/icon.png3.42KB0.77KB▼ 77.58%
vendors/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%