90% wpc-update-variations-in-cart

Code Review | WPC Update Variations In Cart for WooCommerce

WordPress plugin WPC Update Variations In Cart for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-update-variat...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 13, 2021
  • Latest release: Sep 5, 2023
  • Number of updates: 16
  • Update frequency: every 52.9 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,079 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.12MB] [CPU: ▼2.92ms] Passed 4 tests

A check of server-side resources used by WPC Update Variations In Cart for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.70 ▼0.36
Dashboard /wp-admin3.42 ▲0.1246.11 ▼7.24
Posts /wp-admin/edit.php3.53 ▲0.1850.41 ▲1.16
Add New Post /wp-admin/post-new.php6.02 ▲0.1387.40 ▼5.25
Media Library /wp-admin/upload.php3.34 ▲0.1143.64 ▲8.25
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.3132.82
About /wp-admin/admin.php?page=wpclever3.3129.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Update Variations In Cart for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲14213.21 ▼1.191.67 ▼0.3438.52 ▼11.90
Dashboard /wp-admin2,286 ▲954.96 ▼0.08104.89 ▼10.5873.43 ▲25.15
Posts /wp-admin/edit.php2,169 ▲832.07 ▲0.0537.93 ▲2.0535.35 ▼0.99
Add New Post /wp-admin/post-new.php1,742 ▲20022.26 ▲3.98711.94 ▲71.0155.56 ▲2.53
Media Library /wp-admin/upload.php1,459 ▲714.15 ▼0.12100.26 ▲1.8275.56 ▲29.36
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7292.2732.8355.13
About /wp-admin/admin.php?page=wpclever1,3842.1631.4133.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

wpc-update-variations-in-cart/wpc-update-variations-in-cart.php Passed 13 tests

The principal PHP file in "WPC Update Variations In Cart for WooCommerce" v. 1.0.9 is loaded by WordPress automatically on each request
84 characters long description:
WPC Update Variations In Cart gives your customer power to change variation in cart.

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
Everything looks great! No dangerous files found in this plugin1,273 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP48827608
CSS3926468
JavaScript3332168
SVG10029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants7100.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
No PNG files were detected