72% size-chart-product-for-woocommerce

Code Review | Size Chart Product For Woocommerce

WordPress plugin Size Chart Product For Woocommerce scored72%from 54 tests.

About plugin

  • Plugin page: size-chart-produc...
  • Plugin version: 1.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 24, 2022
  • Latest release: Oct 2, 2023
  • Number of updates: 8
  • Update frequency: every 58.1 days
  • Top authors: silverplugins217 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.15MB] [CPU: ▼17.02ms] Passed 4 tests

Analyzing server-side resources used by Size Chart Product For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.5918.73 ▼31.05
Dashboard /wp-admin3.36 ▲0.0650.21 ▼1.30
Posts /wp-admin/edit.php3.22 ▼0.1330.92 ▼22.86
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.50 ▼12.88
Media Library /wp-admin/upload.php3.28 ▲0.0639.04 ▲1.77
Add New /wp-admin/post-new.php?post_type=scpfw_size_chart3.4050.28
Import Sample Size Charts /wp-admin/edit.php?post_type=scpfw_size_chart&page=scpfw-import-sample-size-charts3.2533.05
All Size Charts /wp-admin/edit.php?post_type=scpfw_size_chart3.2132.15

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
recovery_mode_email_last_sent
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Size Chart Product For Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,510 ▼23613.30 ▼0.970.76 ▼1.1221.63 ▼22.38
Dashboard /wp-admin2,263 ▲755.06 ▲0.16113.68 ▼4.8542.57 ▼2.25
Posts /wp-admin/edit.php45 ▼2,0440.44 ▼1.560.07 ▼38.7611.25 ▼22.61
Add New Post /wp-admin/post-new.php1,558 ▲2517.68 ▼5.52651.64 ▲15.5649.36 ▼2.21
Media Library /wp-admin/upload.php1,436 ▲514.45 ▲0.20102.88 ▼22.2847.12 ▲3.04
Add New /wp-admin/post-new.php?post_type=scpfw_size_chart3,8418.91263.48133.26
Import Sample Size Charts /wp-admin/edit.php?post_type=scpfw_size_chart&page=scpfw-import-sample-size-charts8521.9831.2828.00
All Size Charts /wp-admin/edit.php?post_type=scpfw_size_chart450.440.0610.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=scpfw_size_chart
    • > Error in wp-content/plugins/size-chart-product-for-woocommerce/main/frontend/scpfw_front.php+90
    Uncaught Error: Call to undefined function is_product() in wp-content/plugins/size-chart-product-for-woocommerce/main/frontend/scpfw_front.php:90
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): scpfw_header_action()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(565): WP_Hook->do_action()
    #3 wp-includes/class-wp.php(796): do_action_ref_array()
    #4 wp-includes/functions.php(1335): WP->main()
    #5 wp-admin/includes/post.php(1283): wp()
    #6 wp-admin/includes/class-wp-posts-list-table.php(165): wp_edit_posts_query()
    #7 wp-admin/edit.php(235): WP_Posts_List_Table->prepare_items()
    #8 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/size-chart-product-for-woocommerce/main/backend/scpfw_charts_mb.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/size-chart-product-for-woocommerce/main/resource/scpfw-load-js-css.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/size-chart-product-for-woocommerce/main/frontend/scpfw_front.php:88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/size-chart-product-for-woocommerce/main/backend/scpfw_create_post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/size-chart-product-for-woocommerce/main/resource/scpfw-load-custom-post.php:605
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/size-chart-product-for-woocommerce/size-chart-product-for-woocommerce.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/size-chart-product-for-woocommerce/main/resource/scpfw-load-my-textdomain.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/size-chart-product-for-woocommerce/main/backend/scpfw_product_mb.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=scpfw_size_chart&page=scpfw-import-sample-size-charts
    • > Network (severe)
    wp-content/plugins/woocommerce/assets/css/admin.css?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=scpfw_size_chart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=scpfw_size_chart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=scpfw_size_chart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultString is deprecated since version 5.5.0! Use wp.i18n instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=scpfw_size_chart
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/edit.php?post_type=scpfw_size_chart
    • > Network (severe)
    wp-admin/edit.php?post_type=scpfw_size_chart - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 require attention:
  • Screenshots: These screenshots do not have images: #6 (Show Size Chart), #7 (Show How to Measure)
  • Contributors: Plugin contributors not specified
The official readme.txt might help

size-chart-product-for-woocommerce/size-chart-product-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "Size Chart Product For Woocommerce" version 1.1
44 characters long description:
This plugin allows create Size Chart plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,154 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP8267232,795
CSS31717770
JavaScript4105152588
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
13 PNG files occupy 0.45MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/women-dress-size-chart.png11.72KB6.98KB▼ 40.41%
assets/images/men_tshirt.png48.07KB25.86KB▼ 46.20%
assets/images/mens-shoes-size-chart.png10.77KB6.14KB▼ 42.97%
assets/images/support.png6.44KB5.59KB▼ 13.09%
assets/images/cloth_size_chart.png21.98KB12.55KB▼ 42.91%