88% woo-advanced-product-size-chart

Code Review | Product Size Charts Plugin for WooCommerce

WordPress plugin Product Size Charts Plugin for WooCommerce scored88%from 54 tests.

About plugin

  • Plugin page: woo-advanced-prod...
  • Plugin version: 2.4.3.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Jul 24, 2023
  • Number of updates: 145
  • Update frequency: every 16.2 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

20,000+ active /243,331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.79ms] Passed 4 tests

Analyzing server-side resources used by Product Size Charts Plugin for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0032.96 ▼3.00
Dashboard /wp-admin3.31 ▼0.0444.33 ▼15.15
Posts /wp-admin/edit.php3.36 ▲0.0046.82 ▼0.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.98 ▼0.21
Media Library /wp-admin/upload.php3.23 ▲0.0032.23 ▲0.19

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 273 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
fs_debug_mode
fs_active_plugins
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Product Size Charts Plugin for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.031.63 ▲0.0542.73 ▲2.12
Dashboard /wp-admin2,195 ▲215.48 ▼0.0483.62 ▼3.7540.08 ▼2.22
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0438.49 ▲3.7037.50 ▲0.77
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▼0.43646.65 ▼45.9352.45 ▼4.22
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0394.70 ▼14.5942.46 ▼6.35

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #12, #2, #4, #6, #8 in woo-advanced-product-size-chart/assets to your readme.txt
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

woo-advanced-product-size-chart/size-chart-for-woocommerce.php 77% from 13 tests

The entry point to "Product Size Charts Plugin for WooCommerce" version 2.4.3.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-advanced-product-size-chart.php" instead of "size-chart-for-woocommerce.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "4.5")
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin45,078 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1418,57719,46638,211
PO File41,4441,8353,677
JavaScript82222191,338
SVG11701,035
CSS225172817

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity92.59
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.76
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,343
▷ Static methods20014.89%
▷ Public methods95070.74%
▷ Protected methods171.27%
▷ Private methods37628.00%
Functions148
▷ Named functions14698.65%
▷ Anonymous functions21.35%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 3.71MB with 2.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/pro-features-img/feature-box-three-img.png188.42KB60.89KB▼ 67.69%
admin/images/pro-features-img/feature-box-one-img.png267.76KB84.43KB▼ 68.47%
admin/images/pro-features-img/feature-box-two-img.png114.92KB35.06KB▼ 69.50%
admin/images/thedotstore-images/screenshots/Getting_Started_01.png154.61KB45.90KB▼ 70.31%
admin/images/thedotstore-images/screenshots/Getting_Started_02.png343.09KB133.84KB▼ 60.99%