87% product-slider-for-woocommerce-lite

Code Review | Product Slider For WooCommerce Lite

WordPress plugin Product Slider For WooCommerce Lite scored 87% from 54 tests.

About plugin

  • Plugin page: product-slider-fo...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 5.8.1
  • First release: Oct 16, 2018
  • Latest release: Dec 7, 2021
  • Number of updates: 21
  • Update frequency: every 54.7 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active / 13,116 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼180.74ms] Passed 4 tests

An overview of server-side resources used by Product Slider For WooCommerce Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0029.27 ▼2.85
Dashboard /wp-admin3.06 ▼0.0033.07 ▼19.26
Posts /wp-admin/edit.php3.11 ▲0.0029.98 ▼5.14
Add New Post /wp-admin/post-new.php5.42 ▼0.0276.11 ▼695.71
Media Library /wp-admin/upload.php3.00 ▲0.0024.15 ▼0.16

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 122 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Product Slider For WooCommerce Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲11415.80 ▲0.185.56 ▼1.2877.43 ▼0.91
Dashboard /wp-admin2,933 ▲376.03 ▼0.11115.85 ▼14.61166.13 ▼7.36
Posts /wp-admin/edit.php2,743 ▼03.24 ▼0.0067.09 ▲2.81143.99 ▲8.59
Add New Post /wp-admin/post-new.php3,735 ▲5617.83 ▼0.41425.87 ▼13.07155.89 ▼3.54
Media Library /wp-admin/upload.php1,752 ▼05.46 ▼0.10131.13 ▼13.94185.54 ▲1.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 47× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/frontend/data/ribbon/ribbon-settings.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/admin/settings/psfw-post.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/frontend/data/ribbon.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/admin/settings/psfw-banner.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/frontend/data/inner/thumbnail-image.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/admin/settings/psfw-usages.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/admin/fields/button-settings.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/frontend/data/ribbon/individual-ribbon.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/admin/settings/psfw-product.php
    • > /wp-content/plugins/product-slider-for-woocommerce-lite/inc/admin/settings/psfw-general.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/product-slider-for-woocommerce-lite/inc/psfwl-block/psfwl-block-init.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

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

The entry point to "Product Slider For WooCommerce Lite" version 1.1.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected32,958 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
CSS958243125,318
PHP493177503,784
JavaScript92047203,171
SVG100685

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity56.75
▷ Minimum class complexity3.00
▷ Maximum class complexity134.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods95
▷ Static methods99.47%
▷ Public methods9397.89%
▷ Protected methods22.11%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants25
▷ Global constants1664.00%
▷ Class constants936.00%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 3.37MB with 1.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/demo/slider-templates/template-3.png429.74KB161.10KB▼ 62.51%
images/demo/slider-templates/template-4.png274.48KB96.87KB▼ 64.71%
images/plugin.png12.50KB5.31KB▼ 57.50%
images/controls1.png2.74KB1.42KB▼ 48.29%
images/googleplus.png1.91KB0.99KB▼ 48.06%