84% wc-variations-as-single-product

Code Review | Variations as Single Product for WooCommerce

WordPress plugin Variations as Single Product for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-variations-as-...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 9, 2023
  • Latest release: Nov 20, 2023
  • Number of updates: 3
  • Update frequency: every 65.0 days
  • Top authors: storeplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /378 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.92ms] Passed 4 tests

An overview of server-side resources used by Variations as Single Product for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1333.72 ▼6.37
Dashboard /wp-admin3.42 ▲0.1246.70 ▼2.07
Posts /wp-admin/edit.php3.54 ▲0.1849.59 ▲3.33
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.35 ▲1.50
Media Library /wp-admin/upload.php3.35 ▲0.1232.84 ▼0.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Variations as Single Product for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3614.22 ▼0.041.79 ▲0.1039.29 ▼6.45
Dashboard /wp-admin2,206 ▲265.62 ▼0.0196.62 ▼0.7943.53 ▼2.96
Posts /wp-admin/edit.php2,109 ▲92.00 ▼0.1540.46 ▲0.0536.69 ▼2.18
Add New Post /wp-admin/post-new.php1,534 ▲823.20 ▼0.11590.14 ▼72.4249.96 ▼12.81
Media Library /wp-admin/upload.php1,408 ▲144.22 ▲0.0295.66 ▲0.5741.84 ▼1.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-variations-as-single-product/public/partials/woo-variations-as-single-product-public-display.php
    • > /wp-content/plugins/wc-variations-as-single-product/admin/partials/woo-variations-as-single-product-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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 to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wc-variations-as-single-product === )
Please take inspiration from this readme.txt

wc-variations-as-single-product/wc-variations-as-single-product.php Passed 13 tests

The main file in "Variations as Single Product for WooCommerce" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
This is a description of the plugin.

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 plugin514 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12188598505
JavaScript24546
CSS2083

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.23
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin