83% woocommerce-recently-viewed-products-from-all-visitor-by-samsys

Code Review | WooCommerce Recently Viewed Products from all visitors by Samsys

WordPress plugin WooCommerce Recently Viewed Products from all visitors by Samsys scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-recen...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.8
  • WordPress version: 6.3.1
  • First release: Mar 26, 2014
  • Latest release: Mar 27, 2014
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: RicardoCorreia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.49ms] Passed 4 tests

A check of server-side resources used by WooCommerce Recently Viewed Products from all visitors by Samsys
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.17 ▼6.54
Dashboard /wp-admin3.34 ▲0.0450.56 ▼3.27
Posts /wp-admin/edit.php3.39 ▲0.0451.85 ▼1.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.63 ▼3.00
Media Library /wp-admin/upload.php3.26 ▲0.0337.71 ▲3.30

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_ssys_wc_recently_viewed
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Recently Viewed Products from all visitors by Samsys
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.22 ▼0.051.71 ▼0.1543.65 ▼1.86
Dashboard /wp-admin2,198 ▲185.63 ▼0.0489.92 ▼9.9437.95 ▼7.30
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0039.73 ▼0.6336.09 ▼4.12
Add New Post /wp-admin/post-new.php1,526 ▼223.02 ▲0.06682.69 ▲13.0651.82 ▼4.58
Media Library /wp-admin/upload.php1,397 ▼64.12 ▼0.07103.28 ▼1.2144.53 ▼2.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_ssys_wc_recently_viewed
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-recently-viewed-products-from-all-visitor-by-samsys/ssys-recently-viewed-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

woocommerce-recently-viewed-products-from-all-visitor-by-samsys/woocommerce-ssys-recently-viewed.php 85% from 13 tests

The main PHP file in "WooCommerce Recently Viewed Products from all visitors by Samsys" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-recently-viewed-products-from-all-visitor-by-samsys.php" instead of "woocommerce-ssys-recently-viewed.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin137 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34889108
PO File17329

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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