84% linked-variation-for-woocommerce

Code Review | Linked Variation for WooCommerce

WordPress plugin Linked Variation for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: linked-variation-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.17+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2020
  • Latest release: May 25, 2021
  • Number of updates: 17
  • Update frequency: every 12.2 days
  • Top authors: raazon (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /4,463 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.48ms] Passed 4 tests

Server-side resources used by Linked Variation for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0227.26 ▼15.22
Dashboard /wp-admin3.40 ▲0.1045.43 ▼6.29
Posts /wp-admin/edit.php3.52 ▲0.1648.88 ▲3.21
Add New Post /wp-admin/post-new.php5.99 ▲0.1092.11 ▲5.63
Media Library /wp-admin/upload.php3.33 ▲0.0937.45 ▲0.39

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
lvfw_db_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Linked Variation for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,480 ▼27713.47 ▼0.770.48 ▼1.5615.98 ▼30.64
Dashboard /wp-admin2,221 ▲364.84 ▼0.05105.76 ▼11.8041.17 ▼6.26
Posts /wp-admin/edit.php2,106 ▲172.04 ▲0.0240.42 ▲1.8735.39 ▲2.59
Add New Post /wp-admin/post-new.php1,529 ▼023.14 ▲4.71596.26 ▼50.8261.12 ▲7.87
Media Library /wp-admin/upload.php1,406 ▲184.27 ▲0.0597.87 ▼1.1845.49 ▲4.55

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • lvfw_db_version

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/init.php
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/upgrade.php
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/class-activator.php
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/class-deactivator.php
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/templates/products.php
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/class-functions.php
    • > /wp-content/plugins/linked-variation-for-woocommerce/includes/templates/variations.php

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: products, woocommerce variation, e-commerce, devsace, variation...

linked-variation-for-woocommerce/linked-variation-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Linked Variation for WooCommerce" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5" instead of "3.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin774 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9116111560
CSS417878
PO File1272974
JavaScript35762

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.67
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
assets/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
assets/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
assets/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/css/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%