89% smart-upsell-compare-for-woocommerce

Code Review | Smart Upsell Compare for Woocommerce

WordPress plugin Smart Upsell Compare for Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: smart-upsell-comp...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 2, 2021
  • Latest release: Aug 9, 2021
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: iffikhan30 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /287 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.10ms] Passed 4 tests

An overview of server-side resources used by Smart Upsell Compare for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.65 ▲0.97
Dashboard /wp-admin3.31 ▲0.0152.38 ▲1.66
Posts /wp-admin/edit.php3.36 ▲0.0152.90 ▼0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.99 ▼10.37
Media Library /wp-admin/upload.php3.24 ▲0.0135.09 ▲2.92

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Smart Upsell Compare for Woocommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.62 ▲0.0343.41 ▲4.40
Dashboard /wp-admin2,198 ▲185.63 ▲0.0292.11 ▲1.9442.11 ▼0.32
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.1335.52 ▼3.8736.33 ▲0.59
Add New Post /wp-admin/post-new.php1,526 ▼023.56 ▲0.04648.02 ▼6.0660.41 ▲11.88
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0198.13 ▲1.1244.16 ▲0.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: smart, woocommerce, compare, upsell system, upsell

smart-upsell-compare-for-woocommerce/smart-upsell-compare-woo.php 69% from 13 tests

This is the main PHP file of "Smart Upsell Compare for Woocommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("https://crea8ivedots.com/")
  • Main file name: Name the main plugin file the same as the plugin slug ("smart-upsell-compare-for-woocommerce.php" instead of "smart-upsell-compare-woo.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
Success! There were no dangerous files found in this plugin235 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32157135
CSS10067
JavaScript15033

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin