88% uni-woo-custom-product-options

Code Review | Product Options and Price Calculation Formulas for WooCommerce – Uni CPO

WordPress plugin Product Options and Price Calculation Formulas for WooCommerce – Uni CPO scored88%from 54 tests.

About plugin

  • Plugin page: uni-woo-custom-pr...
  • Plugin version: 4.9.32
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.1.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2017
  • Latest release: Dec 1, 2023
  • Number of updates: 183
  • Update frequency: every 12.1 days
  • Top authors: moomooagency (100%)

Code review

54 tests

User reviews

73 reviews

Install metrics

2,000+ active /154,053 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.00MB] [CPU: ▼6.64ms] Passed 4 tests

Server-side resources used by Product Options and Price Calculation Formulas for WooCommerce – Uni CPO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.09 ▼6.23
Dashboard /wp-admin3.31 ▲0.0149.04 ▼4.71
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▼4.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.25 ▼3.21
Media Library /wp-admin/upload.php3.23 ▲0.0032.00 ▼10.72

Server storage [IO: ▲9.28MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 457 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Product Options and Price Calculation Formulas for WooCommerce – Uni CPO: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.70 ▲0.491.81 ▲0.0444.97 ▲0.49
Dashboard /wp-admin2,199 ▲245.59 ▲0.0196.93 ▼23.0545.55 ▲0.25
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0343.42 ▲1.0539.85 ▲1.78
Add New Post /wp-admin/post-new.php1,530 ▼623.22 ▲0.20633.87 ▼31.6157.16 ▲6.90
Media Library /wp-admin/upload.php1,404 ▲74.20 ▼0.09109.55 ▲8.7447.63 ▲3.70

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 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
8 plugin tags: maths formula, woocommerce plugins, custom options, product visual builder, price calculation...

uni-woo-custom-product-options/uni-cpo.php 62% from 13 tests

"Product Options and Price Calculation Formulas for WooCommerce – Uni CPO" version 4.9.32's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.6" instead of "7.1.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("uni-woo-custom-product-options.php" instead of "uni-cpo.php")
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 74 characters long)
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)
  • 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

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin88,057 lines of code in 380 files:
LanguageFilesBlank linesComment linesLines of code
PHP29410,87922,47056,434
PO File86,80611,93016,961
JavaScript301,4071,8279,425
SVG1322203,914
CSS352562671,323

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity28.08
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces7
Traits0
Classes218
▷ Abstract classes41.83%
▷ Concrete classes21498.17%
▷ Final classes31.40%
Methods2,095
▷ Static methods41319.71%
▷ Public methods1,65879.14%
▷ Protected methods351.67%
▷ Private methods40219.19%
Functions262
▷ Named functions18972.14%
▷ Anonymous functions7327.86%
Constants156
▷ Global constants10969.87%
▷ Class constants4730.13%
▷ Public constants47100.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
13 PNG files occupy 0.04MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/border-solid.png0.91KB0.08KB▼ 91.11%
assets/images/autosave.png1.53KB0.56KB▼ 63.43%
assets/images/border-dashed.png0.92KB0.10KB▼ 88.79%
assets/images/linked.png1.04KB0.22KB▼ 79.01%
assets/images/blank.png1.63KB0.12KB▼ 92.87%