10% product-recommendation-quiz-for-ecommerce

Code Review | Product Recommendation Quiz for eCommerce

WordPress plugin Product Recommendation Quiz for eCommerce scored10%from 54 tests.

About plugin

  • Plugin page: product-recommend...
  • Plugin version: 2.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2020
  • Latest release: Nov 29, 2023
  • Number of updates: 122
  • Update frequency: every 10.2 days
  • Top authors: revenuehunt (100%)

Code review

54 tests

User reviews

87 reviews

Install metrics

3,000+ active /49,638 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory

Server metrics [RAM: ▼1.90MB] [CPU: ▼57.84ms] Passed 4 tests

A check of server-side resources used by Product Recommendation Quiz for eCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.53 ▼43.32
Dashboard /wp-admin2.11 ▼1.236.89 ▼58.63
Posts /wp-admin/edit.php2.12 ▼1.248.69 ▼39.35
Add New Post /wp-admin/post-new.php2.11 ▼3.776.40 ▼90.04
Media Library /wp-admin/upload.php2.11 ▼1.116.90 ▼24.81

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Recommendation Quiz for eCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲6514.21 ▼0.504.98 ▲3.2942.98 ▼6.41
Dashboard /wp-admin2,217 ▲405.62 ▼0.0198.38 ▲10.9542.27 ▲4.93
Posts /wp-admin/edit.php2,125 ▲252.14 ▲0.1240.07 ▲0.1932.34 ▼1.05
Add New Post /wp-admin/post-new.php1,549 ▲1023.24 ▼0.02618.56 ▼93.4860.69 ▲11.04
Media Library /wp-admin/upload.php1,428 ▲284.18 ▲0.0196.87 ▼1.2242.27 ▼5.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/product-recommendation-quiz-for-ecommerce/admin/partials/product-recommendation-quiz-for-ecommerce-admin-display.php
    • > /wp-content/plugins/product-recommendation-quiz-for-ecommerce/public/partials/product-recommendation-quiz-for-ecommerce-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: You can take inspiration from this readme.txt

product-recommendation-quiz-for-ecommerce/product-recommendation-quiz-for-ecommerce.php 92% from 13 tests

The primary PHP file in "Product Recommendation Quiz for eCommerce" version 2.2.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 206 characters long)

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 plugin590 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12168494526
CSS215858
JavaScript24546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants10
▷ Global constants10100.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
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/revenuehunt-logo.png82.60KB35.21KB▼ 57.37%