89% product-recommendations-custom-locations

Code Review | Product Recommendations - Custom Locations

WordPress plugin Product Recommendations - Custom Locations scored89%from 54 tests.

About plugin

  • Plugin page: product-recommend...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Aug 17, 2023
  • Number of updates: 8
  • Update frequency: every 116.7 days
  • Top authors: franticpsyx (75%)jasonkytros (25%)SomewhereWarm (25%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.80ms] Passed 4 tests

A check of server-side resources used by Product Recommendations - Custom Locations
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.46 ▼9.38
Dashboard /wp-admin3.33 ▲0.0343.74 ▼5.90
Posts /wp-admin/edit.php3.44 ▲0.0944.84 ▼5.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.46 ▼14.73
Media Library /wp-admin/upload.php3.25 ▲0.0233.82 ▲1.79

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Recommendations - Custom Locations
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.18 ▼1.061.61 ▼0.4444.31 ▲1.03
Dashboard /wp-admin2,213 ▲285.85 ▲0.79107.27 ▼9.0843.40 ▼4.25
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0140.71 ▲6.3136.16 ▼0.80
Add New Post /wp-admin/post-new.php1,545 ▲1122.95 ▼0.09655.89 ▼29.9561.61 ▲9.84
Media Library /wp-admin/upload.php1,398 ▲104.24 ▲0.02100.21 ▼5.7142.08 ▼1.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
8 plugin tags: conversion, woocommerce, cross-sells, up-sells, toolkit...

product-recommendations-custom-locations/product-recommendations-custom-locations.php 85% from 13 tests

The main PHP file in "Product Recommendations - Custom Locations" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin844 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9231486705
Sass116290
JavaScript116349

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.33
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods62
▷ Static methods3251.61%
▷ Public methods5791.94%
▷ Protected methods46.45%
▷ Private methods11.61%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin