90% wc-chitchats-shipping

Code Review | ChitChats Shipping for WooCommerce

WordPress plugin ChitChats Shipping for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wc-chitchats-ship...
  • Plugin version: 1.5.11
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2020
  • Latest release: Aug 21, 2023
  • Number of updates: 47
  • Update frequency: every 21.5 days
  • Top authors: oneteamsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,045 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.54ms] Passed 4 tests

A check of server-side resources used by ChitChats Shipping for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.72 ▲1.33
Dashboard /wp-admin3.41 ▲0.0745.65 ▼17.42
Posts /wp-admin/edit.php3.52 ▲0.1749.47 ▼0.35
Add New Post /wp-admin/post-new.php5.99 ▲0.1190.05 ▼3.26
Media Library /wp-admin/upload.php3.33 ▲0.1134.54 ▼1.12

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for ChitChats Shipping for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▲0.041.80 ▼0.6349.90 ▲7.65
Dashboard /wp-admin2,195 ▲185.48 ▼0.1483.27 ▼17.8739.79 ▼2.76
Posts /wp-admin/edit.php2,100 ▼02.13 ▲0.1735.12 ▲1.0937.19 ▲1.53
Add New Post /wp-admin/post-new.php1,526 ▼123.78 ▲0.84617.18 ▼68.0657.27 ▲5.57
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0293.64 ▼12.8741.77 ▼2.89

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
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

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:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

wc-chitchats-shipping/wc-chitchats-shipping.php Passed 13 tests

"ChitChats Shipping for WooCommerce" version 1.5.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
57 characters long description:
Displays live ChitChats shipping rates at cart / checkout

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,581 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,0132374,581

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity29.21
▷ Minimum class complexity1.00
▷ Maximum class complexity171.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes19
▷ Abstract classes526.32%
▷ Concrete classes1473.68%
▷ Final classes00.00%
Methods293
▷ Static methods20.68%
▷ Public methods17660.07%
▷ Protected methods11137.88%
▷ Private methods62.05%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/1TeamSoftware-logo.png14.55KB4.50KB▼ 69.05%
assets/images/1TeamSoftware-icon.png0.59KB0.75KB0.00%