78% woo-chilexpress-shipping

Code Review | Chilexpress Shipping for WooCommerce

WordPress plugin Chilexpress Shipping for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woo-chilexpress-s...
  • Plugin version: 1.6.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Nov 2, 2022
  • Number of updates: 196
  • Update frequency: every 10.0 days
  • Top authors: TCattd (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /37,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.11ms] Passed 4 tests

This is a short check of server-side resources used by Chilexpress Shipping for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.10 ▼3.25
Dashboard /wp-admin3.31 ▲0.0052.47 ▲2.46
Posts /wp-admin/edit.php3.36 ▲0.0048.52 ▼3.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.30 ▼16.82
Media Library /wp-admin/upload.php3.23 ▲0.0036.48 ▼0.65

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chilexpress Shipping for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.14 ▼0.212.06 ▲0.0841.97 ▼7.11
Dashboard /wp-admin2,198 ▲215.63 ▼0.0389.48 ▲1.3838.89 ▼8.48
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0138.06 ▲2.1833.69 ▼3.28
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▼0.32694.66 ▲23.5857.38 ▼2.09
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0995.41 ▼9.9142.52 ▼3.25

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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 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
Almost there! Just fix the following items
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-chilexpress-shipping/wsdl/index.php
    • > /wp-content/plugins/woo-chilexpress-shipping/classes/index.php
    • > /wp-content/plugins/woo-chilexpress-shipping/index.php
    • > /wp-content/plugins/woo-chilexpress-shipping/includes/index.php
    • > /wp-content/plugins/woo-chilexpress-shipping/assets/index.php
    • > /wp-content/plugins/woo-chilexpress-shipping/assets/js/index.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-chilexpress-shipping/whq-woocommerce-chilexpress-shipping.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: shipping, chilexpress, woocommerce, chile

woo-chilexpress-shipping/whq-woocommerce-chilexpress-shipping.php 77% from 13 tests

"Chilexpress Shipping for WooCommerce" version 1.6.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-chilexpress-shipping.php" instead of "whq-woocommerce-chilexpress-shipping.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.5" instead of "5.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,396 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP154574152,530
JavaScript42983501,022
XML4028700
Markdown1840144

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity48.33
▷ Minimum class complexity1.00
▷ Maximum class complexity143.00
Average method complexity6.26
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods622.22%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected