78% paquete-mx

Code Review | Paquete.MX

WordPress plugin Paquete.MX scored78%from 54 tests.

About plugin

  • Plugin page: paquete-mx
  • Plugin version: 4.2.2
  • PHP compatiblity: 5.6.36+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4
  • WordPress version: 6.3.1
  • First release: Nov 30, 2018
  • Latest release: Oct 7, 2020
  • Number of updates: 23
  • Update frequency: every 29.4 days
  • Top authors: gerardosteven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼8.16ms] Passed 4 tests

A check of server-side resources used by Paquete.MX
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3036.61 ▼4.56
Dashboard /wp-admin3.62 ▲0.3244.66 ▼5.92
Posts /wp-admin/edit.php3.74 ▲0.3852.13 ▲4.93
Add New Post /wp-admin/post-new.php6.20 ▲0.3180.06 ▼11.44
Media Library /wp-admin/upload.php3.55 ▲0.3135.81 ▼10.72
Paquete.MX /wp-admin/admin.php?page=paquetemx3.4930.60
Mis Envíos /wp-admin/admin.php?page=paquetemx_shippings3.5132.14

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_paquetemx_shippings
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paquete.MX
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.28 ▼0.991.62 ▼0.0637.30 ▼3.26
Dashboard /wp-admin2,232 ▲474.90 ▼0.02109.09 ▲5.9567.07 ▲23.33
Posts /wp-admin/edit.php2,115 ▲472.00 ▼0.0639.31 ▲1.2336.81 ▲4.77
Add New Post /wp-admin/post-new.php1,545 ▲1223.31 ▲0.25777.81 ▲86.9652.95 ▼2.23
Media Library /wp-admin/upload.php1,411 ▲234.18 ▼0.0399.29 ▼9.5784.74 ▲40.06
Paquete.MX /wp-admin/admin.php?page=paquetemx1,2552.2027.3435.32
Mis Envíos /wp-admin/admin.php?page=paquetemx_shippings8332.0724.5325.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=paquetemx
    • > Notice in wp-content/plugins/paquete-mx/admin/settings_cb.php+65
    Trying to access array offset on value of type bool

SRP 50% from 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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/paquete-mx/admin/shipping_method.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paquete-mx/admin/admin_actions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/paquete-mx/admin/products_shipping_settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("#")
The official readme.txt is a good inspiration

paquete-mx/paquetemx.php 92% from 13 tests

This is the main PHP file of "Paquete.MX" version 4.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paquete-mx.php" instead of "paquetemx.php")

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
Success! There were no dangerous files found in this plugin1,876 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP83351981,876

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity28.50
▷ Minimum class complexity19.00
▷ Maximum class complexity38.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1684.21%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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
admin/images/admin_icon.png2.05KB0.87KB▼ 57.28%