83% wpecomm-mercado-pago-module

Code Review | WPeComm Mercado Pago Module Oficial

WordPress plugin WPeComm Mercado Pago Module Oficial scored83%from 54 tests.

About plugin

  • Plugin page: wpecomm-mercado-p...
  • Plugin version: 4.2.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 24, 2016
  • Latest release: Mar 24, 2017
  • Number of updates: 12
  • Update frequency: every 17.6 days
  • Top authors: mercadopago (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /15,435 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.11ms] Passed 4 tests

An overview of server-side resources used by WPeComm Mercado Pago Module Oficial
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.46 ▼1.66
Dashboard /wp-admin3.35 ▲0.0048.02 ▼18.34
Posts /wp-admin/edit.php3.40 ▲0.0447.81 ▼3.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.59 ▼0.63
Media Library /wp-admin/upload.php3.27 ▲0.0434.11 ▲0.18

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 107 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WPeComm Mercado Pago Module Oficial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲6014.35 ▼0.011.85 ▼0.0543.66 ▼10.12
Dashboard /wp-admin2,198 ▲215.57 ▼0.0593.55 ▼6.5943.39 ▼0.47
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0636.23 ▼0.8834.09 ▼2.59
Add New Post /wp-admin/post-new.php1,537 ▲923.16 ▲0.15643.32 ▼31.6258.87 ▼6.04
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0496.60 ▼14.2042.58 ▼4.91

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wpecomm-mercado-pago-module/wpecomm-mercado-pago-module/mercadopago-custom.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wpecomm-mercado-pago-module/wpecomm-mercado-pago-module/mercadopago-ticket.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tested up to: Version format is invalid
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

wpecomm-mercado-pago-module/mercadopago-module.php 77% from 13 tests

The main PHP script in "WPeComm Mercado Pago Module Oficial" version 4.2.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpecomm-mercado-pago-module.php" instead of "mercadopago-module.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 203 characters long)

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
There were no executable files found in this plugin7,825 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP53976194,200
PO File171,343342,907
JavaScript217997553
CSS1348165

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity33.14
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods2128.38%
▷ Public methods6891.89%
▷ Protected methods00.00%
▷ Private methods68.11%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
44 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wpecomm-mercado-pago-module/mercadopago-images/MLU/CUPOM_MLU.png0.26KB0.11KB▼ 58.17%
wpecomm-mercado-pago-module/mercadopago-images/MLB/banner_all_methods.png12.40KB5.25KB▼ 57.67%
(invalid) wpecomm-mercado-pago-module/mercadopago-images/MLV/credit_card.png13.54KB0.00KB▼ 100.00%
wpecomm-mercado-pago-module/mercadopago-images/MLA/MLA.png2.56KB1.97KB▼ 23.03%
wpecomm-mercado-pago-module/mercadopago-images/error.png0.66KB0.57KB▼ 13.84%