10% promociones-mercado-pago

Code Review | Promociones Mercado Pago

WordPress plugin Promociones Mercado Pago scored10%from 54 tests.

About plugin

  • Plugin page: promociones-merca...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Mar 12, 2018
  • Latest release: Mar 12, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mauriciowyler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,151 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/promociones-mercado-pago/TokioMP_Plugin.php+32
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.80MB] [CPU: ▼57.78ms] Passed 4 tests

An overview of server-side resources used by Promociones Mercado Pago
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.275.95 ▼38.29
Dashboard /wp-admin2.21 ▼1.139.72 ▼56.34
Posts /wp-admin/edit.php2.21 ▼1.146.53 ▼45.35
Add New Post /wp-admin/post-new.php2.21 ▼3.678.86 ▼91.12
Media Library /wp-admin/upload.php2.21 ▼1.015.72 ▼31.69

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
TokioMP_Plugin__installed
TokioMP_Plugin_CanDoSomething
TokioMP_Plugin_AmAwesome
TokioMP_Plugin__version
can_compress_scripts
db_upgraded
TokioMP_Plugin_ATextInput
...

Browser metrics Passed 4 tests

An overview of browser requirements for Promociones Mercado Pago
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.38 ▼0.001.88 ▼0.0143.66 ▼6.73
Dashboard /wp-admin2,200 ▲235.64 ▼0.0487.86 ▼10.1237.26 ▼7.24
Posts /wp-admin/edit.php2,102 ▼12.04 ▼0.0133.70 ▼7.8731.96 ▼6.36
Add New Post /wp-admin/post-new.php1,542 ▼323.15 ▼0.07673.19 ▼1.5356.52 ▼2.72
Media Library /wp-admin/upload.php1,402 ▲24.42 ▲0.15106.27 ▼8.3841.98 ▼5.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • TokioMP_Plugin__installed
    • widget_recent-comments
    • TokioMP_Plugin_ATextInput
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • TokioMP_Plugin_AmAwesome
    • TokioMP_Plugin_CanDoSomething
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/promociones-mercado-pago/promociones-mercado-pago.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mercado pago, tarjetas de crdito, mercadopago, tokio agency, promociones

promociones-mercado-pago/promociones-mercado-pago.php Passed 13 tests

The main PHP file in "Promociones Mercado Pago" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
38 characters long description:
Listado de promociones de Mercado Pago

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,038 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8184546529
CSS130509

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.83
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods4461.11%
▷ Protected methods2838.89%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.23MB with 0.17MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/bank-promo-mla-logos.png237.96KB61.79KB▼ 74.03%