94% side-cart-plus-for-woocommerce

Code Review | side cart plus for woocommerce

WordPress plugin side cart plus for woocommerce scored 94% from 54 tests.

About plugin

  • Plugin page: side-cart-plus-fo...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Jun 3, 2021
  • Latest release: Sep 23, 2021
  • Number of updates: 9
  • Update frequency: every 12.6 days
  • Top authors: easytechy (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active / 256 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by side cart plus for woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.96 ▲11.31
Dashboard /wp-admin3.06 ▲0.0052.22 ▼3.80
Posts /wp-admin/edit.php3.11 ▲0.0047.12 ▼9.72
Add New Post /wp-admin/post-new.php5.42 ▼0.0296.80 ▼681.07
Media Library /wp-admin/upload.php3.00 ▲0.0034.81 ▼3.80

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for side cart plus for woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲19216.12 ▲0.4911.06 ▼0.3355.51 ▼2.60
Dashboard /wp-admin2,970 ▲395.89 ▼0.27149.14 ▼28.46124.20 ▼8.44
Posts /wp-admin/edit.php2,736 ▼32.70 ▲0.0072.18 ▼12.39111.61 ▼1.32
Add New Post /wp-admin/post-new.php1,615 ▼6821.46 ▲3.00296.11 ▼111.67118.88 ▼13.41
Media Library /wp-admin/upload.php1,810 ▲35.04 ▼0.02160.22 ▼3.37127.86 ▼10.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/side-cart-plus-for-woocommerce/class-option/siwscp_icon_file.php
    • > /wp-content/plugins/side-cart-plus-for-woocommerce/side-cart-plus-woocommerce.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: add to cart open side cart, mini cart, woocommerce cart, ajax cart, woocommerce side cart...

side-cart-plus-for-woocommerce/side-cart-plus-woocommerce.php 92% from 13 tests

The main PHP script in "side cart plus for woocommerce" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("side-cart-plus-for-woocommerce.php" instead of "side-cart-plus-woocommerce.php")

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
Success! There were no dangerous files found in this plugin5,731 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript56131,1172,582
PHP6623722,327
CSS85393822

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity41.50
▷ Minimum class complexity2.00
▷ Maximum class complexity116.00
Average method complexity7.94
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods35
▷ Static methods617.14%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
owlcarousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%
assest/images/crown.png0.53KB0.39KB▼ 26.25%