84% woo-product-variations-popup

Code Review | WooCommerce Product Variations Popup

WordPress plugin WooCommerce Product Variations Popup scored 84% from 54 tests.

About plugin

  • Plugin page: woo-product-varia...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 7, 2017
  • Latest release: May 19, 2021
  • Number of updates: 9
  • Update frequency: every 160.8 days
  • Top authors: codiminds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.94ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Product Variations Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.04 ▼6.40
Dashboard /wp-admin3.32 ▲0.0246.90 ▼0.26
Posts /wp-admin/edit.php3.37 ▲0.0245.05 ▼2.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.83 ▼7.00
Media Library /wp-admin/upload.php3.24 ▲0.0138.69 ▲2.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Product Variations Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.25 ▼0.351.76 ▼0.1339.19 ▼6.59
Dashboard /wp-admin2,206 ▲185.84 ▲0.87109.88 ▲0.9238.71 ▼2.04
Posts /wp-admin/edit.php2,092 ▲432.05 ▲0.0336.99 ▼2.2931.98 ▼0.32
Add New Post /wp-admin/post-new.php1,534 ▲123.45 ▲0.23631.07 ▲23.9163.14 ▲8.19
Media Library /wp-admin/upload.php1,391 ▲124.20 ▲0.02100.85 ▼2.2542.21 ▼1.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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 items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: product_id in wp-content/plugins/woo-product-variations-popup/popup.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-product-variations-popup/woocommerce-product-variations-popup.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-product-variations-popup/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-product-variations-popup/popup.php:9

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

woo-product-variations-popup/woocommerce-product-variations-popup.php 92% from 13 tests

The entry point to "WooCommerce Product Variations Popup" version 1.0 is a PHP file that has certain tags in its header comment area
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 ("woo-product-variations-popup.php" instead of "woocommerce-product-variations-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin220 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32540109
CSS15293
JavaScript13018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin