78% woo-update-variations-in-cart

Code Review | Woo Update Variations In Cart

WordPress plugin Woo Update Variations In Cart scored78%from 54 tests.

About plugin

  • Plugin page: woo-update-variat...
  • Plugin version: 0.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Apr 15, 2022
  • Number of updates: 67
  • Update frequency: every 28.8 days
  • Top authors: codingkart (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

600+ active /10,614 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.07MB] [CPU: ▼4.32ms] Passed 4 tests

Analyzing server-side resources used by Woo Update Variations In Cart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0748.13 ▼3.74
Dashboard /wp-admin3.37 ▲0.0749.13 ▼1.29
Posts /wp-admin/edit.php3.42 ▲0.0648.33 ▼2.75
Add New Post /wp-admin/post-new.php5.96 ▲0.0686.76 ▼9.04
Media Library /wp-admin/upload.php3.30 ▲0.0640.64 ▼1.75
Cart Variation Update /wp-admin/options-general.php?page=woocommerce-edit-variation3.2635.59

Server storage [IO: ▲0.16MB] [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: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
WOO_CK_WUVIC_status
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Update Variations In Cart
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.43 ▲0.131.85 ▲0.0145.37 ▼1.62
Dashboard /wp-admin2,219 ▲315.88 ▲0.97107.77 ▼2.6442.46 ▲0.80
Posts /wp-admin/edit.php2,102 ▲342.03 ▲0.0339.11 ▲2.4134.37 ▼5.50
Add New Post /wp-admin/post-new.php1,364 ▼15016.99 ▼0.69567.41 ▼135.4755.82 ▼9.54
Media Library /wp-admin/upload.php1,398 ▲134.25 ▲0.05104.47 ▼19.6544.28 ▼0.87
Cart Variation Update /wp-admin/options-general.php?page=woocommerce-edit-variation9272.0634.0634.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • WOO_CK_WUVIC_status
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=woocommerce-edit-variation
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=woocommerce-edit-variation
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=woocommerce-edit-variation
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=woocommerce-edit-variation
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-update-variations-in-cart/admin/class-wc-update-variation-in-cart-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-update-variations-in-cart/front/class-wc_update-variation_in-cart_ck.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocommerce change variation, woocommerce update variation on cart, woocommerce cart, woocommerce, woocommerce variation

woo-update-variations-in-cart/woo-update-variations-in-cart-ck.php 77% from 13 tests

This is the main PHP file of "Woo Update Variations In Cart" version 0.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-update-variations-in-cart.php" instead of "woo-update-variations-in-cart-ck.php")

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
Good job! No executable or dangerous file extensions detected451 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP337931321
JavaScript21314129
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/edit.png1.39KB1.34KB▼ 3.45%