83% easy-up-sell-for-woocommerce

Code Review | Easy Up-Sell for WooCommerce

WordPress plugin Easy Up-Sell for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: easy-up-sell-for-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 26, 2018
  • Latest release: Feb 27, 2018
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: fuji9 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /601 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.43ms] Passed 4 tests

Analyzing server-side resources used by Easy Up-Sell for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.82 ▲1.72
Dashboard /wp-admin3.38 ▲0.0451.55 ▼19.03
Posts /wp-admin/edit.php3.50 ▲0.1449.14 ▲1.63
Add New Post /wp-admin/post-new.php5.98 ▲0.1089.57 ▼4.80
Media Library /wp-admin/upload.php3.31 ▲0.0838.38 ▲0.49

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

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

Browser metrics Passed 4 tests

Easy Up-Sell 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,901 ▲15513.65 ▼0.519.38 ▲7.6341.38 ▼2.45
Dashboard /wp-admin2,202 ▲255.62 ▲0.0986.14 ▼15.0640.44 ▼2.61
Posts /wp-admin/edit.php2,101 ▲12.04 ▲0.0635.62 ▲0.4433.60 ▼2.59
Add New Post /wp-admin/post-new.php1,530 ▲222.96 ▼0.24641.34 ▼6.9453.27 ▼12.68
Media Library /wp-admin/upload.php1,404 ▲104.17 ▼0.0098.63 ▼1.9941.07 ▼4.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-up-sell-for-woocommerce/public/partials/eus-for-woocommerce-public-display.php
    • > /wp-content/plugins/easy-up-sell-for-woocommerce/admin/partials/eus-for-woocommerce-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Requires php: The plugin version is formatted incorrectly
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

easy-up-sell-for-woocommerce/eus-for-woocommerce.php 85% from 13 tests

The primary PHP file in "Easy Up-Sell for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-up-sell-for-woocommerce.php" instead of "eus-for-woocommerce.php")

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
Good job! No executable or dangerous file extensions detected310 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160588304
JavaScript24546
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2676.47%
▷ Protected methods00.00%
▷ Private methods823.53%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin