78% wc-sales-up

Code Review | Sales UP for WooCommerce - Boost Your sales with Cross Sells

WordPress plugin Sales UP for WooCommerce - Boost Your sales with Cross Sells scored78%from 54 tests.

About plugin

  • Plugin page: wc-sales-up
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 9, 2021
  • Latest release: Jul 11, 2022
  • Number of updates: 10
  • Update frequency: every 55.0 days
  • Top authors: viritte7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /566 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Sales UP for WooCommerce - Boost Your sales with Cross Sells
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.04 ▼3.80
Dashboard /wp-admin3.31 ▲0.0043.98 ▼1.84
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▼0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.90 ▼3.48
Media Library /wp-admin/upload.php3.23 ▲0.0032.88 ▼1.24
On Product /wp-admin/admin.php?page=woo_on_product3.0022.38
On Cart/Checkout /wp-admin/edit.php?post_type=checkout-offers3.0425.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sales UP for WooCommerce - Boost Your sales with Cross Sells
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.10 ▼0.141.85 ▲0.2236.93 ▼2.51
Dashboard /wp-admin2,189 ▲125.66 ▼0.0193.69 ▲4.1140.95 ▼3.44
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0038.88 ▼1.5137.23 ▼2.94
Add New Post /wp-admin/post-new.php1,528 ▲223.09 ▼0.00647.39 ▲29.2056.60 ▲1.65
Media Library /wp-admin/upload.php1,394 ▼34.18 ▼0.0293.43 ▼9.0641.53 ▼0.41
On Product /wp-admin/admin.php?page=woo_on_product280.420.103.47
On Cart/Checkout /wp-admin/edit.php?post_type=checkout-offers280.420.074.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wc-sales-up/admin/partials/wsp-checkout-offer.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-sales-up/admin/partials/wsp-on-product-offer.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-sales-up/public/class-wc-sales-up-checkout.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wc-sales-up/admin/partials/wsp-single-product.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-sales-up/public/class-wc-sales-up-product.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-sales-up/public/partials/wc-sales-up-product-checkout.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-sales-up/public/partials/wc-sales-up-product-display.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Sales_Up_Product' not found in wp-content/plugins/wc-sales-up/public/class-wc-sales-up-cart.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=woo_on_product
    • > Network (severe)
    wp-admin/admin.php?page=woo_on_product - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=checkout-offers
    • > Network (severe)
    wp-admin/edit.php?post_type=checkout-offers - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wc-sales-up/wc-sales-up.php 92% from 13 tests

"Sales UP for WooCommerce - Boost Your sales with Cross Sells" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 189 characters long)

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 plugin3,567 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP192421,0292,296
JavaScript32728639
CSS34253632

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.47
Average class complexity34.50
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods77
▷ Static methods1722.08%
▷ Public methods7293.51%
▷ Protected methods00.00%
▷ Private methods56.49%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin