89% woo-upsell

Code Review | UpSell for WooCommerce

WordPress plugin UpSell for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-upsell
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2019
  • Latest release: Oct 12, 2023
  • Number of updates: 9
  • Update frequency: every 170.2 days
  • Top authors: nordiccustommade (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /3,432 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼8.85ms] Passed 4 tests

This is a short check of server-side resources used by UpSell for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.03 ▼2.47
Dashboard /wp-admin3.32 ▼0.0245.03 ▼15.48
Posts /wp-admin/edit.php3.38 ▲0.0246.35 ▼3.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.75 ▼14.44
Media Library /wp-admin/upload.php3.25 ▲0.0233.78 ▼0.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for UpSell for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.081.68 ▲0.2042.04 ▲1.66
Dashboard /wp-admin2,195 ▲185.64 ▼0.1290.70 ▲3.0739.46 ▲0.09
Posts /wp-admin/edit.php2,100 ▲31.98 ▲0.0440.16 ▲4.5634.51 ▲0.37
Add New Post /wp-admin/post-new.php1,526 ▼023.74 ▲0.17669.45 ▼19.9753.74 ▲3.59
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.0395.00 ▼0.7742.95 ▲2.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in woo-upsell/assets to your readme.txt
The official readme.txt might help

woo-upsell/woo-upsell.php 92% from 13 tests

The main file in "UpSell for WooCommerce" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 336 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin435 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP510734332
JavaScript334064
CSS13139

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants3
▷ Global constants3100.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 files were detected