84% wc-recently-viewed-products

Code Review | Wc Recently viewed products

WordPress plugin Wc Recently viewed products scored84%from 54 tests.

About plugin

  • Plugin page: wc-recently-viewe...
  • Plugin version: 1.0.1
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Jul 31, 2018
  • Latest release: Oct 31, 2022
  • Number of updates: 7
  • Update frequency: every 221.9 days
  • Top authors: deepintowp (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /3,928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Wc Recently viewed products
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.08 ▼11.00
Dashboard /wp-admin3.32 ▲0.0248.60 ▼5.85
Posts /wp-admin/edit.php3.37 ▲0.0149.92 ▼6.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.57 ▼15.56
Media Library /wp-admin/upload.php3.24 ▲0.0138.25 ▲0.91

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Wc Recently viewed products
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.28 ▼1.124.96 ▲3.0441.05 ▼0.91
Dashboard /wp-admin2,209 ▲244.86 ▼0.07106.18 ▼35.4239.09 ▼7.95
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0039.27 ▼2.6735.98 ▼4.40
Add New Post /wp-admin/post-new.php1,514 ▼1917.56 ▼5.64673.93 ▲3.2152.56 ▼2.92
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0498.47 ▲1.6146.32 ▼1.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-recently-viewed-products/wc-recently-viewed-producst.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
3 plugin tags: wc recently viewed products, recently viewed products, woocommerce recently viewed products

wc-recently-viewed-products/wc-recently-viewed-producst.php 85% from 13 tests

The primary PHP file in "Wc Recently viewed products" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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 ("wc-recently-viewed-products.php" instead of "wc-recently-viewed-producst.php")

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
Everything looks great! No dangerous files found in this plugin344 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9101167344

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity7.40
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin