84% woo-mercadopago-gateway-checkout

Code Review | Checkout Gateway for Mercadopago and WooCommerce

WordPress plugin Checkout Gateway for Mercadopago and WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-mercadopago-g...
  • Plugin version: 1.5.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0
  • WordPress version: 6.3.1
  • First release: Oct 19, 2019
  • Latest release: May 25, 2022
  • Number of updates: 23
  • Update frequency: every 41.3 days
  • Top authors: crplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,216 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 gracefully, with no errors

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

This is a short check of server-side resources used by Checkout Gateway for Mercadopago and WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.61 ▼5.53
Dashboard /wp-admin3.31 ▲0.0044.63 ▼2.69
Posts /wp-admin/edit.php3.36 ▲0.0044.71 ▼2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.52 ▼8.88
Media Library /wp-admin/upload.php3.23 ▲0.0033.38 ▼0.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checkout Gateway for Mercadopago and WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.22 ▼1.184.69 ▲3.0138.63 ▼2.61
Dashboard /wp-admin2,206 ▲245.88 ▲0.78100.14 ▼2.5039.88 ▼5.25
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.1034.80 ▼0.8134.17 ▼0.72
Add New Post /wp-admin/post-new.php1,519 ▼1623.00 ▼0.08670.11 ▼1.6562.29 ▲1.10
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0399.00 ▼11.4843.66 ▼3.03

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CRPlugins\\MPGatewayCheckout\\Api\\ApiConnector' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Api/MPApi.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CRPlugins\\MPGatewayCheckout\\Settings\\Fields\\Field' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Settings/Fields/TextField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CRPlugins\\MPGatewayCheckout\\Settings\\Sections\\Section' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Settings/Sections/MpSection.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'CRPlugins\\MPGatewayCheckout\\Settings\\Fields\\FieldInterface' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Settings/Fields/Field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CRPlugins\\MPGatewayCheckout\\Settings\\Fields\\Field' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Settings/Fields/SelectField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CRPlugins\\MPGatewayCheckout\\Settings\\Fields\\Field' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Settings/Fields/NumberField.php:5
    • > PHP Fatal error
      Trait 'CRPlugins\\MPGatewayCheckout\\Helper\oticesTrait' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Helper/Helper.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'CRPlugins\\MPGatewayCheckout\\Settings\\Sections\\Section' not found in wp-content/plugins/woo-mercadopago-gateway-checkout/Settings/Sections/FrontendSection.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: creditcard, mercadopago, payments, gateway

woo-mercadopago-gateway-checkout/woo-mercadopago-gateway-checkout.php 85% from 13 tests

The primary PHP file in "Checkout Gateway for Mercadopago and WooCommerce" version 1.5.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "3.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,691 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP261853261,221
PO File3153153462
JavaScript20144
CSS2002
Markdown1102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.16
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces6
Interfaces3
Traits4
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes317.65%
Methods97
▷ Static methods3435.05%
▷ Public methods7577.32%
▷ Protected methods1313.40%
▷ Private methods99.28%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/dist/img/mercadopago-logo.png2.41KB2.35KB▼ 2.67%