72% hot-products

Code Review | Hot Products

WordPress plugin Hot Products scored72%from 54 tests.

About plugin

  • Plugin page: hot-products
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 6.3.1
  • First release: Apr 26, 2022
  • Latest release: Aug 17, 2022
  • Number of updates: 9
  • Update frequency: every 13.0 days
  • Top authors: mrjoshfisher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.75ms] Passed 4 tests

This is a short check of server-side resources used by Hot Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.09 ▲1.46
Dashboard /wp-admin3.34 ▲0.0348.56 ▼15.23
Posts /wp-admin/edit.php3.39 ▲0.0351.58 ▼0.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.91 ▲3.12
Media Library /wp-admin/upload.php3.26 ▲0.0341.60 ▲3.68
Hot Products /wp-admin/options-general.php?page=hotproducts3.2034.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Hot Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼1.131.81 ▼0.1442.45 ▼1.14
Dashboard /wp-admin2,210 ▲225.88 ▲0.0499.67 ▼15.1340.98 ▼3.61
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0638.67 ▲1.1734.24 ▲0.06
Add New Post /wp-admin/post-new.php1,541 ▲2223.07 ▼0.13636.28 ▼11.2661.83 ▲1.90
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.04107.73 ▼11.6246.14 ▼2.41
Hot Products /wp-admin/options-general.php?page=hotproducts8342.0324.7227.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hotproducts
    • > Notice in wp-content/plugins/hot-products/hotproducts.php+169
    Undefined variable: message_placement

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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hot-products/hotproducts.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=hotproducts
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=hotproducts 177 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=hotproducts
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=hotproducts 181 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: woocommerce

hot-products/hotproducts.php 85% from 13 tests

Analyzing the main PHP file in "Hot Products" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hot-products.php" instead of "hotproducts.php")
  • Git Repository: An alternative Git repository was detected

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
Success! There were no dangerous files found in this plugin157 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11162157

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
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/img/flame.png14.32KB9.04KB▼ 36.86%