83% woo-show-single-variations-shop-category

Code Review | Show Variations On Shop & Category WooCommerce

WordPress plugin Show Variations On Shop & Category WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: woo-show-single-v...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 9, 2019
  • Latest release: Aug 22, 2023
  • Number of updates: 40
  • Update frequency: every 36.9 days
  • Top authors: gravitymaster97 (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

800+ active /13,307 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
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.94ms] Passed 4 tests

This is a short check of server-side resources used by Show Variations On Shop & Category WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.95 ▼5.82
Dashboard /wp-admin3.39 ▲0.0946.08 ▼7.70
Posts /wp-admin/edit.php3.45 ▲0.1051.37 ▼1.02
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.16 ▼8.90
Media Library /wp-admin/upload.php3.32 ▲0.1041.11 ▼1.34
Woo Variation Settings /wp-admin/options-general.php?page=WSSVSC3.2735.02

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Show Variations On Shop & Category WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.011.76 ▼0.3043.04 ▼1.87
Dashboard /wp-admin2,202 ▲255.64 ▼0.0189.38 ▼6.1938.70 ▼5.96
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0437.31 ▲2.9535.37 ▼0.02
Add New Post /wp-admin/post-new.php1,531 ▲323.26 ▲0.20680.80 ▼11.9453.37 ▼19.33
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.02111.13 ▼7.7447.82 ▼1.09
Woo Variation Settings /wp-admin/options-general.php?page=WSSVSC8712.0325.1637.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=WSSVSC
    • > Notice in wp-admin/includes/template.php+118
    Trying to get property 'cap' of non-object
    • > GET request to /wp-admin/options-general.php?page=WSSVSC
    • > Notice in wp-admin/includes/template.php+118
    Trying to get property 'assign_terms' of non-object
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=WSSVSC
    • > Notice in wp-admin/includes/class-walker-category-checklist.php+114
    Trying to get property 'term_id' of non-object
    • > GET request to /wp-admin/options-general.php?page=WSSVSC
    • > Warning in wp-admin/includes/class-walker-category-checklist.php+89
    array_map(): Expected parameter 2 to be an array, object given
    • > GET request to /wp-admin/options-general.php?page=WSSVSC
    • > Warning in wp-admin/includes/class-walker-category-checklist.php+91
    in_array() expects parameter 2 to be array, null given
    • > GET request to /wp-admin/options-general.php?page=WSSVSC
    • > Notice in wp-admin/includes/class-walker-category-checklist.php+118
    Trying to get property 'name' of non-object

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

woo-show-single-variations-shop-category/woo-show-single-variations.php 85% from 13 tests

The entry point to "Show Variations On Shop & Category WooCommerce" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-show-single-variations-shop-category.php" instead of "woo-show-single-variations.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected3,440 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25443732,534
CSS111219515
PHP48770391

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.00
▷ Minimum class complexity6.00
▷ Maximum class complexity19.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/select2.png0.51KB0.99KB0.00%