83% customers-who-viewed-this-also-viewed-that-woocommerce

Code Review | Customers who viewed this also viewed that - WooCommerce

WordPress plugin Customers who viewed this also viewed that - WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: customers-who-vie...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.4-5.2.4
  • WordPress version: 6.3.1
  • First release: Oct 25, 2018
  • Latest release: Oct 29, 2019
  • Number of updates: 5
  • Update frequency: every 74.6 days
  • Top authors: benhall14 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Customers who viewed this also viewed that - WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.66 ▲0.10
Dashboard /wp-admin3.39 ▲0.0542.85 ▼18.02
Posts /wp-admin/edit.php3.51 ▲0.1544.92 ▼2.09
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.92 ▲2.80
Media Library /wp-admin/upload.php3.32 ▲0.0936.66 ▲0.60
Customers Also Viewed /wp-admin/admin.php?page=conobe-customers-also-viewed3.2831.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Customers who viewed this also viewed that - WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.311.93 ▼0.1443.60 ▼4.04
Dashboard /wp-admin2,192 ▲155.56 ▼0.0682.02 ▼11.6841.87 ▲2.04
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0339.26 ▲2.9934.56 ▼1.78
Add New Post /wp-admin/post-new.php1,526 ▼223.64 ▲0.53606.72 ▼72.7350.42 ▼4.67
Media Library /wp-admin/upload.php1,394 ▼64.20 ▲0.0198.48 ▲0.2243.52 ▼1.44
Customers Also Viewed /wp-admin/admin.php?page=conobe-customers-also-viewed9731.9921.1937.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function benhall14\\get_option() in wp-content/plugins/customers-who-viewed-this-also-viewed-that-woocommerce/lib/ConobeWoocommerceAlsoViewed.php:92

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: product recommendation, related products, woocommerce

customers-who-viewed-this-also-viewed-that-woocommerce/woocommerce-customers-also-viewed.php 77% from 13 tests

Analyzing the main PHP file in "Customers who viewed this also viewed that - WooCommerce" version 1.1
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("customers-who-viewed-this-also-viewed-that-woocommerce.php" instead of "woocommerce-customers-also-viewed.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected523 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3134284447
CSS19076

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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