84% wc-kmercadopago-gpl

Code Review | Tools for MercadoPago and WooCommerce

WordPress plugin Tools for MercadoPago and WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-kmercadopago-gpl
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.10-6.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2021
  • Latest release: Dec 3, 2023
  • Number of updates: 24
  • Update frequency: every 30.5 days
  • Top authors: kijam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,070 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.07MB] [CPU: ▼10.34ms] Passed 4 tests

Analyzing server-side resources used by Tools for MercadoPago and WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.94 ▼0.5321.94 ▼20.15
Dashboard /wp-admin3.40 ▲0.0648.32 ▼13.15
Posts /wp-admin/edit.php3.52 ▲0.1647.32 ▼2.04
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.46 ▼6.01
Media Library /wp-admin/upload.php3.33 ▲0.1037.27 ▲2.89

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
kmercadopagogpl_installed_date
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Tools for MercadoPago and WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,448 ▼29914.13 ▼0.110.50 ▼1.3418.21 ▼25.21
Dashboard /wp-admin2,201 ▲215.62 ▼0.0489.68 ▼7.4340.49 ▼1.34
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0039.30 ▲3.6934.83 ▲1.27
Add New Post /wp-admin/post-new.php1,529 ▲322.82 ▼0.45640.00 ▼32.8868.07 ▲12.56
Media Library /wp-admin/upload.php1,406 ▲94.16 ▼0.0597.44 ▼4.4544.17 ▲1.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • kmercadopagogpl_installed_date
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_woocommerce_currency() in wp-content/plugins/wc-kmercadopago-gpl/includes/data-settings-mercadopagogpl-basic.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-kmercadopago-gpl/includes/class-wc-payment-gateway-mercadopagogpl.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_MercadoPagoGPL' not found in wp-content/plugins/wc-kmercadopago-gpl/includes/class-wc-kmercadopagogpl-basic.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/wc-kmercadopago-gpl/includes/class-wc-kmercadopagogpl-manager.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-kmercadopago-gpl/includes/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-kmercadopago-gpl/includes/data-settings-mercadopagogpl-manager.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: woocommerce, ecommerce, mercadopago

wc-kmercadopago-gpl/class-wc-kmercadopagogpl.php 92% from 13 tests

The primary PHP file in "Tools for MercadoPago and WooCommerce" version 1.0.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-kmercadopago-gpl.php" instead of "class-wc-kmercadopagogpl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected6,427 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PO File91,4221,7733,806
PHP91677442,437
JSON120108
JavaScript10276

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity70.60
▷ Minimum class complexity5.00
▷ Maximum class complexity243.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods87
▷ Static methods2832.18%
▷ Public methods7485.06%
▷ Protected methods33.45%
▷ Private methods1011.49%
Functions15
▷ Named functions426.67%
▷ Anonymous functions1173.33%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mercadopago.png1.13KB1.13KB0.00%