83% upsells-products-both-sides

Code Review | WOOCOMMERCE RELATED PRODUCTS BOTH SIDES

WordPress plugin WOOCOMMERCE RELATED PRODUCTS BOTH SIDES scored83%from 54 tests.

About plugin

  • Plugin page: upsells-products-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2017
  • Latest release: Apr 13, 2017
  • Number of updates: 6
  • Update frequency: every 4.7 days
  • Top authors: devila (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by WOOCOMMERCE RELATED PRODUCTS BOTH SIDES
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0144.15 ▲3.35
Dashboard /wp-admin3.35 ▲0.0148.92 ▼9.55
Posts /wp-admin/edit.php3.41 ▲0.0149.65 ▲1.64
Add New Post /wp-admin/post-new.php5.94 ▲0.0190.56 ▼0.14
Media Library /wp-admin/upload.php3.28 ▲0.0139.16 ▼0.04

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WOOCOMMERCE RELATED PRODUCTS BOTH SIDES: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▼0.241.75 ▲0.0545.57 ▼1.40
Dashboard /wp-admin2,192 ▲125.57 ▼0.0884.76 ▼11.1839.16 ▼5.28
Posts /wp-admin/edit.php2,082 ▼181.99 ▼0.0034.41 ▼3.0433.43 ▼3.30
Add New Post /wp-admin/post-new.php1,526 ▼023.74 ▲0.66694.04 ▲3.6073.23 ▲12.81
Media Library /wp-admin/upload.php1,394 ▼34.19 ▲0.0297.06 ▼13.8644.04 ▼1.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/upsells-products-both-sides/woocommerce-upsells-products-both-sides.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: You should set the name of your plugin on the first line ( === upsells-products-both-sides === )
You can look at the official readme.txt

upsells-products-both-sides/woocommerce-upsells-products-both-sides.php 92% from 13 tests

The principal PHP file in "WOOCOMMERCE RELATED PRODUCTS BOTH SIDES" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("upsells-products-both-sides.php" instead of "woocommerce-upsells-products-both-sides.php")

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
Success! There were no dangerous files found in this plugin44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141144

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected