10% enviopack-mexico

Code Review | Envíopack (México)

WordPress plugin Envíopack (México) scored10%from 54 tests.

About plugin

  • Plugin page: enviopack-mexico
  • Plugin version: 1.0.13
  • PHP compatiblity: 7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2022
  • Latest release: Nov 7, 2023
  • Number of updates: 36
  • Update frequency: every 17.4 days
  • Top authors: nachocrespo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,182 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Error in wp-content/plugins/enviopack-mexico/utils.php+419
    Uncaught Error: Class 'WC_Shipping_Zone' not found in wp-content/plugins/enviopack-mexico/utils.php:419
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): Ecomerciar\Enviopack\Utils\create_page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

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

An overview of server-side resources used by Envíopack (México)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.07 ▼5.88
Dashboard /wp-admin3.31 ▲0.0046.16 ▼2.37
Posts /wp-admin/edit.php3.36 ▲0.0046.85 ▲0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.22 ▲4.63
Media Library /wp-admin/upload.php3.23 ▲0.0031.83 ▼4.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
enviopack_api_key
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
enviopack_api_secret

Browser metrics Passed 4 tests

A check of browser resources used by Envíopack (México)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.72 ▼0.001.68 ▼0.5038.27 ▼5.40
Dashboard /wp-admin2,198 ▲245.55 ▼0.0894.43 ▼5.1242.26 ▼0.50
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0040.07 ▲3.5035.54 ▲1.02
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.29630.30 ▲7.1554.01 ▲2.89
Media Library /wp-admin/upload.php1,403 ▲94.16 ▼0.0298.09 ▼3.3342.79 ▲0.10

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • enviopack_api_secret
    • can_compress_scripts
    • widget_recent-comments
    • enviopack_api_key
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: ecommerce, woocommerce, downloadable, logistica, enviopack...

enviopack-mexico/woocommerce-enviopack.php 85% from 13 tests

The entry point to "Envíopack (México)" version 1.0.13 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("enviopack-mexico.php" instead of "woocommerce-enviopack.php")
  • Requires PHP: Required version number formatted incorrectly (ex. "7.0" instead of "7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,544 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP73261992,455
JavaScript116086
CSS2003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity126.67
▷ Minimum class complexity15.00
▷ Maximum class complexity197.00
Average method complexity7.72
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods55
▷ Static methods814.55%
▷ Public methods5294.55%
▷ Protected methods00.00%
▷ Private methods35.45%
Functions50
▷ Named functions4896.00%
▷ Anonymous functions24.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
PNG images were not found in this plugin