73% woo-unlimited-upsell-lite

Code Review | WooCommerce Unlimited Upsell Lite

WordPress plugin WooCommerce Unlimited Upsell Lite scored 73% from 54 tests.

About plugin

  • Plugin page: woo-unlimited-ups...
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 5.9.2
  • First release: Oct 28, 2017
  • Latest release: Jun 9, 2020
  • Number of updates: 15
  • Update frequency: every 63.9 days
  • Top authors: kungwoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,408 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼294.24ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Unlimited Upsell Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2253.47 ▲4.70
Dashboard /wp-admin3.70 ▲0.2934.67 ▼0.28
Posts /wp-admin/edit.php3.92 ▲0.2939.66 ▼2.01
Add New Post /wp-admin/post-new.php7.25 ▲0.2597.38 ▼1,177.37
Media Library /wp-admin/upload.php3.65 ▲0.3527.08 ▲2.70
Offers /wp-admin/admin.php?page=woocommerce-unlimited-upsell-offers-view3.5627.97
Settings /wp-admin/admin.php?page=woocommerce-unlimited-upsell-settings3.5624.22
Add Offer /wp-admin/admin.php?page=woocommerce-unlimited-upsell-offer-edit3.6225.86
Dashboard /wp-admin/admin.php?page=woocommerce-unlimited-upsell-dashboard3.5623.07

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 210 new files
Database: 3 new tables, 3 new options
New tables
wp_wooup_view_stats
wp_wooup_offers
wp_wooup_stats
New WordPress options
woocommerce_unlimited_upsell_delete_data
wooup_db_ver
woocommerce_unlimited_upsell_version

Browser metrics Passed 4 tests

WooCommerce Unlimited Upsell Lite: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲9216.12 ▲0.356.28 ▼0.5918.37 ▲15.95
Dashboard /wp-admin2,959 ▲1016.12 ▼0.09117.51 ▼14.06152.48 ▼9.22
Posts /wp-admin/edit.php2,763 ▲693.24 ▲0.0062.85 ▼2.46144.19 ▼5.54
Add New Post /wp-admin/post-new.php1,785 ▲12422.26 ▲5.77436.92 ▲13.77152.24 ▼3.22
Media Library /wp-admin/upload.php1,770 ▲725.57 ▲0.01139.55 ▲0.80189.49 ▲9.58
Offers /wp-admin/admin.php?page=woocommerce-unlimited-upsell-offers-view1,2632.6155.86100.23
Settings /wp-admin/admin.php?page=woocommerce-unlimited-upsell-settings1,3093.1671.03142.26
Add Offer /wp-admin/admin.php?page=woocommerce-unlimited-upsell-offer-edit1,7555.75132.93167.45
Dashboard /wp-admin/admin.php?page=woocommerce-unlimited-upsell-dashboard1,1173.3373.72111.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 3 tables
    • wp_wooup_view_stats
    • wp_wooup_offers
    • wp_wooup_stats
  • Zombie WordPress options detected upon uninstall: 1 option
    • woocommerce_unlimited_upsell_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 20× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/admin/class-woocommerce-unlimited-upsell-admin-pages.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/sql/table_offers.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/admin/views/offer-edit.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/class-woocommerce-unlimited-upsell-ajax.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/admin/views/settings.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/class-woocommerce-unlimited-upsell-db.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/admin/class-woocommerce-unlimited-upsell-admin-pages-offers.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/admin/views/dashboard.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/woocommerce-unlimited-upsell.php
    • > /wp-content/plugins/woo-unlimited-upsell-lite/includes/admin/views/offers-view.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

woo-unlimited-upsell-lite/woocommerce-unlimited-upsell.php 77% from 13 tests

The main PHP file in "WooCommerce Unlimited Upsell Lite" ver. 1.1.9 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-unlimited-upsell-lite.php" instead of "woocommerce-unlimited-upsell.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 161 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,060 lines of code in 141 files:
LanguageFilesBlank linesComment linesLines of code
PHP235051,2611,688
SVG200192
JavaScript10100122
JSON10036
CSS120412
HTML1008
Markdown1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.11
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods75
▷ Static methods2533.33%
▷ Public methods5978.67%
▷ Protected methods00.00%
▷ Private methods1621.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/assets/vendor/jquery-ui/images/ui-bg_glass_100_e6e6e6_1x400.png0.26KB0.15KB▼ 40.84%
includes/admin/assets/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
includes/admin/assets/vendor/jquery-ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.41KB0.15KB▼ 62.44%
includes/admin/assets/vendor/jquery-ui/images/ui-icons_fff_256x240.png6.15KB4.17KB▼ 32.13%
includes/admin/assets/vendor/jquery-ui/images/ui-bg_glass_65_96588a_1x400.png0.34KB0.16KB▼ 52.33%