90% product-size-chart-for-woo

Code Review | Product Size Chart For WooCommerce

WordPress plugin Product Size Chart For WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: product-size-char...
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2021
  • Latest release: Jul 15, 2023
  • Number of updates: 29
  • Update frequency: every 30.9 days
  • Top authors: dragonlord47 (48.28%)anhhoangtn93 (37.93%)villatheme (20.69%)

Code review

54 tests

User reviews

25 reviews

Install metrics

4,000+ active /34,873 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.19MB] [CPU: ▼7.88ms] Passed 4 tests

This is a short check of server-side resources used by Product Size Chart For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.81 ▲1.36
Dashboard /wp-admin3.50 ▲0.1543.18 ▼15.26
Posts /wp-admin/edit.php3.61 ▲0.2544.68 ▼3.46
Add New Post /wp-admin/post-new.php6.08 ▲0.1982.10 ▼13.25
Media Library /wp-admin/upload.php3.42 ▲0.1936.70 ▲0.46

Server storage [IO: ▲2.63MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 68 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
woo_sc_template
can_compress_scripts
woo_sc_setting
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Product Size Chart For WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.31 ▼0.061.77 ▲0.1345.09 ▲5.37
Dashboard /wp-admin2,200 ▲235.51 ▼0.1281.88 ▼3.3237.34 ▼4.60
Posts /wp-admin/edit.php2,109 ▲92.00 ▲0.0234.43 ▼7.7433.51 ▼3.12
Add New Post /wp-admin/post-new.php1,534 ▲623.07 ▲0.05693.47 ▲16.1262.76 ▲2.69
Media Library /wp-admin/upload.php1,408 ▲114.15 ▼0.0992.84 ▼5.8544.41 ▼2.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • can_compress_scripts
    • woo_sc_template
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • woo_sc_setting
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: product size chart for woo, wordpress, product size chart, woocommerce size chart, size chart...

product-size-chart-for-woo/product-size-chart-for-woo.php 92% from 13 tests

The main PHP file in "Product Size Chart For WooCommerce" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin8,247 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP8221993,127
SVG30122,880
JavaScript16811091,025
CSS20180140935
PO File1120122280

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity55.12
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity6.90
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods7094.59%
▷ Protected methods22.70%
▷ Private methods22.70%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/sc_logo.png3.01KB0.55KB▼ 81.79%
img/Photos-new-icon.png6.47KB5.17KB▼ 20.05%
img/icon-size.png17.17KB8.43KB▼ 50.92%