84% woocommerce-direct-variation-link

Code Review | WooCommerce Direct Variation Link

WordPress plugin WooCommerce Direct Variation Link scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-direc...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Mar 31, 2015
  • Number of updates: 6
  • Update frequency: every 80.0 days
  • Top authors: jtwiest (66.67%)WPBackOffice (50%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /12,278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.65ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Direct Variation Link
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.37 ▼1.15
Dashboard /wp-admin3.31 ▲0.0048.60 ▼0.52
Posts /wp-admin/edit.php3.36 ▲0.0045.46 ▼5.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.33 ▼23.64
Media Library /wp-admin/upload.php3.23 ▲0.0032.00 ▼0.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Direct Variation Link
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.76 ▲0.381.86 ▲0.3543.86 ▲3.42
Dashboard /wp-admin2,206 ▲185.80 ▼0.0699.16 ▼1.0935.61 ▼8.53
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0335.43 ▼4.6032.06 ▼4.86
Add New Post /wp-admin/post-new.php1,514 ▼017.45 ▼6.06686.29 ▲65.4971.21 ▲27.63
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0495.08 ▼2.1842.77 ▼1.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocommerce-direct-variation-link/direct-variation-link.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: product variations, products, direct link, woocommerce, variable products

woocommerce-direct-variation-link/direct-variation-link.php 92% from 13 tests

The main PHP file in "WooCommerce Direct Variation Link" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-direct-variation-link.php" instead of "direct-variation-link.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203751

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin