90% recently-viewed-and-most-viewed-products

Code Review | Recently viewed and most viewed products

WordPress plugin Recently viewed and most viewed products scored 90% from 54 tests.

About plugin

  • Plugin page: recently-viewed-a...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0.0
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Jul 22, 2022
  • Number of updates: 37
  • Update frequency: every 62.3 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active / 25,444 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
Install script ran successfully

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

Server-side resources used by Recently viewed and most viewed products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.98 ▼6.79
Dashboard /wp-admin3.31 ▲0.0052.91 ▲5.07
Posts /wp-admin/edit.php3.36 ▲0.0047.17 ▲2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.61 ▲9.23
Media Library /wp-admin/upload.php3.23 ▲0.0033.53 ▼1.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Recently viewed and most viewed products
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.67 ▼0.984.46 ▲2.7536.97 ▼8.85
Dashboard /wp-admin2,206 ▲184.86 ▲0.01108.92 ▲4.9343.50 ▲6.49
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0139.27 ▲4.8934.97 ▼0.17
Add New Post /wp-admin/post-new.php1,543 ▲1018.21 ▼5.17626.18 ▼54.1753.43 ▼9.56
Media Library /wp-admin/upload.php1,391 ▲34.28 ▲0.1093.99 ▼14.4342.25 ▼3.21

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: recently viewed, recently and most, recently viewed products, most viewed products, mark most viewed...

recently-viewed-and-most-viewed-products/recently-viewed-and-most-viewed-products.php 92% from 13 tests

"Recently viewed and most viewed products" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,486 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP31562461,098
CSS226256
PO File1333394
JavaScript42638

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity45.33
▷ Minimum class complexity21.00
▷ Maximum class complexity64.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png9.15KB0.80KB▼ 91.21%