93% recently-viewed-products-woocommerce

Code Review | Recently Viewed Products for Woocommerce

WordPress plugin Recently Viewed Products for Woocommerce scored 93% from 54 tests.

About plugin

  • Plugin page: recently-viewed-p...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Aug 11, 2021
  • Latest release: Aug 11, 2021
  • Number of updates: 2
  • Update frequency: every 7.0 days
  • Top authors: wpevince (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 311 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼159.37ms] Passed 4 tests

This is a short check of server-side resources used by Recently Viewed Products for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0024.16 ▲2.31
Dashboard /wp-admin3.06 ▼0.0031.12 ▼5.00
Posts /wp-admin/edit.php3.11 ▲0.0031.15 ▼0.41
Add New Post /wp-admin/post-new.php5.42 ▼0.0266.78 ▼632.61
Media Library /wp-admin/upload.php3.00 ▲0.0024.15 ▲0.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Recently Viewed Products for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.95 ▼0.034.94 ▼0.0175.77 ▼1.35
Dashboard /wp-admin2,933 ▲416.12 ▼0.01116.94 ▼13.59167.82 ▼9.21
Posts /wp-admin/edit.php2,740 ▲343.22 ▼0.0164.49 ▼14.72140.20 ▼50.52
Add New Post /wp-admin/post-new.php3,821 ▲519.14 ▼0.21470.41 ▲19.21167.49 ▼1.72
Media Library /wp-admin/upload.php1,749 ▼35.47 ▼0.03138.11 ▼4.90182.17 ▼4.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/recently-viewed-products-woocommerce/woo-recently-viewed-products.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

recently-viewed-products-woocommerce/woo-recently-viewed-products.php 77% from 13 tests

The entry point to "Recently Viewed Products for Woocommerce" version 1.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 231 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("recently-viewed-products-woocommerce.php" instead of "woo-recently-viewed-products.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,331 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3849452,159
PHP994164381
CSS31017356
Sass2275262
LESS1115152
SVG11013
Ruby1208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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