83% stampedio-product-reviews

Code Review | Stamped.io Product Reviews & UGC for WooCommerce

WordPress plugin Stamped.io Product Reviews & UGC for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: stampedio-product...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.0
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Aug 5, 2023
  • Number of updates: 178
  • Update frequency: every 14.3 days
  • Top authors: stampedio (94.94%)gu3st (5.62%)

Code review

54 tests

User reviews

62 reviews

Install metrics

2,000+ active /35,928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Stamped.io Product Reviews & UGC for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.18 ▼3.22
Dashboard /wp-admin3.31 ▲0.0150.73 ▲0.49
Posts /wp-admin/edit.php3.37 ▲0.0145.24 ▼7.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.09 ▼17.41
Media Library /wp-admin/upload.php3.24 ▲0.0136.72 ▼3.14

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Stamped.io Product Reviews & UGC for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.74 ▲0.471.93 ▲0.3044.12 ▲1.28
Dashboard /wp-admin2,200 ▲265.63 ▲0.0496.71 ▲8.6647.11 ▲4.98
Posts /wp-admin/edit.php2,106 ▲61.95 ▲0.0135.54 ▼1.7533.81 ▼5.49
Add New Post /wp-admin/post-new.php1,531 ▲523.72 ▲0.45672.80 ▲4.8747.07 ▼8.98
Media Library /wp-admin/upload.php1,402 ▲24.18 ▼0.0198.29 ▼14.8543.85 ▼5.83

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/stampedio-product-reviews/admin/cls_stamped_io_settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/stampedio-product-reviews/stampedio-product-reviews.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • License uri: Invalid URI ("http: //www.gnu.org/licenses/gpl-2.0.html")
  • Screenshots: These screenshots lack descriptions #5, #6 in stampedio-product-reviews/assets to your readme.txt
You can take inspiration from this readme.txt

stampedio-product-reviews/stampedio-product-reviews.php 92% from 13 tests

"Stamped.io Product Reviews & UGC for WooCommerce" version 2.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,055 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP72001701,759
JavaScript2273296
CSS1090

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.00
▷ Minimum class complexity4.00
▷ Maximum class complexity63.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods72
▷ Static methods3244.44%
▷ Public methods6590.28%
▷ Protected methods00.00%
▷ Private methods79.72%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 2.62MB with 1.69MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-06.png816.09KB229.39KB▼ 71.89%
assets/screenshot-05.png288.65KB115.62KB▼ 59.95%
assets/icon-256x256.png12.40KB5.51KB▼ 55.52%
assets/banner-772x250.png456.61KB42.82KB▼ 90.62%
assets/icon-128x128.png6.95KB3.87KB▼ 44.34%