83% shipping-mipaquete-woocommerce

Code Review | Shipping Mipaquete Woocommerce

WordPress plugin Shipping Mipaquete Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: shipping-mipaquet...
  • Plugin version: 3.2.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2019
  • Latest release: Jun 9, 2023
  • Number of updates: 121
  • Update frequency: every 10.6 days
  • Top authors: mipaquete (88.43%)saulmorales (12.4%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /23,037 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

An overview of server-side resources used by Shipping Mipaquete Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.30 ▲1.54
Dashboard /wp-admin3.31 ▼0.0444.48 ▼20.73
Posts /wp-admin/edit.php3.36 ▲0.0045.64 ▼3.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.95 ▼7.40
Media Library /wp-admin/upload.php3.23 ▲0.0030.44 ▼3.15

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Shipping Mipaquete Woocommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.13 ▼1.265.14 ▲3.2040.50 ▼1.54
Dashboard /wp-admin2,206 ▲154.86 ▼0.04107.03 ▲5.7242.44 ▼1.08
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0239.04 ▼5.5134.37 ▼7.12
Add New Post /wp-admin/post-new.php1,547 ▲518.56 ▲0.30594.15 ▼4.3168.10 ▲19.18
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0196.13 ▼1.2941.98 ▼1.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 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)
Good news, no errors were detected

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 fix the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-mipaquete-woocommerce/functions/sendingMipaquete.php:192
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-mipaquete-woocommerce/common/common.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/shipping-mipaquete-woocommerce/functions/filters/shipping-upon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/shipping-mipaquete-woocommerce/functions/filters/shipping-normal.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-mipaquete-woocommerce/functions/mipaqueteShippingMethodInit.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-mipaquete-woocommerce/functions/woocommerceCustomFieldMiPaquete.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-mipaquete-woocommerce/functions/formConfig.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shipping-mipaquete-woocommerce/common/common.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shipping-mipaquete-woocommerce/functions/mipaqueteChangeCityCustomer.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Configuración general screenshot-1.png), #2 (Establecer método de envío Mipaquete en zona de envíos screenshot-2.png), #3 (Cotización de envío screenshot-3.png)
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt might help

shipping-mipaquete-woocommerce/client.php 77% from 13 tests

Analyzing the main PHP file in "Shipping Mipaquete Woocommerce" version 3.2.9
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 385 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "2.6")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shipping-mipaquete-woocommerce.php" instead of "client.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,212 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP1993871,159
CSS11053

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.50
▷ Minimum class complexity14.00
▷ Maximum class complexity33.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions2492.31%
▷ Anonymous functions27.69%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-mipaquete.png1.14KB0.36KB▼ 68.43%