89% woocommerce-customer-who-viewed-this-item-also-viewed

Code Review | Customer who viewed this item also viewed using Woocommerce

WordPress plugin Customer who viewed this item also viewed using Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-custo...
  • Plugin version: 3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2015
  • Latest release: Aug 16, 2023
  • Number of updates: 84
  • Update frequency: every 36.4 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /10,069 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Customer who viewed this item also viewed using Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.26 ▼10.59
Dashboard /wp-admin3.31 ▼0.0451.62 ▼17.99
Posts /wp-admin/edit.php3.36 ▲0.0051.21 ▼1.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.88 ▼9.69
Media Library /wp-admin/upload.php3.23 ▲0.0041.15 ▲1.61

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Customer who viewed this item also viewed using Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.67 ▲0.321.77 ▲0.0340.03 ▼1.88
Dashboard /wp-admin2,192 ▲125.65 ▼0.0293.94 ▲6.8042.97 ▲2.19
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0741.80 ▲7.4535.21 ▼3.77
Add New Post /wp-admin/post-new.php1,526 ▼223.24 ▲2.03662.20 ▼22.0752.65 ▼1.90
Media Library /wp-admin/upload.php1,403 ▲34.13 ▼0.09109.14 ▼4.5646.58 ▼1.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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 86% 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: Please take inspiration from this readme.txt

woocommerce-customer-who-viewed-this-item-also-viewed/customer-who-viewed-this-item-also-viewed-using-woocommerce.php 77% from 13 tests

The main PHP script in "Customer who viewed this item also viewed using Woocommerce" version 3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-customer-who-viewed-this-item-also-viewed.php" instead of "customer-who-viewed-this-item-also-viewed-using-woocommerce.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected229 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33583229

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin