10% enviopack

Code Review | EnvíoPack (Chile)

WordPress plugin EnvíoPack (Chile) scored10%from 54 tests.

About plugin

  • Plugin page: enviopack
  • Plugin version: 1.0.14
  • PHP compatiblity: 7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Jan 18, 2022
  • Latest release: Nov 7, 2023
  • Number of updates: 41
  • Update frequency: every 16.2 days
  • Top authors: nachocrespo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,028 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-content/plugins/enviopack/utils.php+416
    Uncaught Error: Class 'WC_Shipping_Zone' not found in wp-content/plugins/enviopack/utils.php:416
    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: ▼5.60ms] Passed 4 tests

This is a short check of server-side resources used by EnvíoPack (Chile)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.39 ▼1.97
Dashboard /wp-admin3.31 ▲0.0044.97 ▼4.86
Posts /wp-admin/edit.php3.36 ▲0.0045.02 ▼3.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.87 ▼12.44
Media Library /wp-admin/upload.php3.23 ▲0.0031.85 ▼0.22

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for EnvíoPack (Chile)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.16 ▼0.041.77 ▲0.1037.71 ▼6.95
Dashboard /wp-admin2,189 ▲125.47 ▼0.1885.56 ▼13.2140.29 ▼2.88
Posts /wp-admin/edit.php2,097 ▼01.95 ▼0.0234.90 ▼3.1934.39 ▼3.07
Add New Post /wp-admin/post-new.php1,526 ▼023.55 ▲0.40597.18 ▼85.6951.17 ▼2.32
Media Library /wp-admin/upload.php1,397 ▼64.21 ▼0.0497.32 ▼4.4244.07 ▲1.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • enviopack_api_key
    • theysaidso_admin_options
    • can_compress_scripts
    • enviopack_api_secret
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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: envios, chile, enviopack, downloadable, logistics...

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

The principal PHP file in "EnvíoPack (Chile)" v. 1.0.14 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("enviopack.php" instead of "woocommerce-enviopack.php")
  • Requires PHP: Periods and digits should be used for the required version number (ex. "7.0" instead of "7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,611 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP73402232,446
JavaScript2402162
CSS2003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity118.33
▷ Minimum class complexity20.00
▷ Maximum class complexity184.00
Average method complexity7.32
▷ Minimum method complexity1.00
▷ Maximum method complexity34.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%
Functions54
▷ Named functions5296.30%
▷ Anonymous functions23.70%
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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-2.png64.47KB21.72KB▼ 66.31%