78% ecommerce-mercadopago-chile

Code Review | Woo MercadoPago Chile

WordPress plugin Woo MercadoPago Chile scored78%from 54 tests.

About plugin

  • Plugin page: ecommerce-mercado...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Mar 22, 2016
  • Number of updates: 4
  • Update frequency: every 13.3 days
  • Top authors: ctala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.68ms] Passed 4 tests

This is a short check of server-side resources used by Woo MercadoPago Chile
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0428.07 ▼14.27
Dashboard /wp-admin3.36 ▲0.0551.57 ▲2.46
Posts /wp-admin/edit.php3.47 ▲0.1146.38 ▼5.85
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.05 ▼13.05
Media Library /wp-admin/upload.php3.28 ▲0.0537.90 ▲2.93

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

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

Browser metrics Passed 4 tests

Woo MercadoPago Chile: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼28113.28 ▼1.080.55 ▼1.2419.88 ▼22.11
Dashboard /wp-admin2,206 ▲184.83 ▼0.02118.82 ▲15.5444.18 ▲2.31
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0636.75 ▼2.2632.14 ▼5.36
Add New Post /wp-admin/post-new.php1,514 ▼1917.66 ▼5.46672.50 ▼17.6069.69 ▲16.36
Media Library /wp-admin/upload.php1,388 ▼34.12 ▼0.04115.79 ▲11.1049.77 ▲4.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ecommerce-mercadopago-chile/views/views/admin/viewAdmin.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/tests/UnitTest.php:6
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ecommerce-mercadopago-chile/WooMercadoPagosChile.php:37
    • > PHP Fatal error
      Uncaught MercadoPagoException: invalid client_id or client_secret in wp-content/plugins/ecommerce-mercadopago-chile/vendor/mercadopago/sdk/lib/mercadopago.php:528

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: ecommerce, chile, woocommerce

ecommerce-mercadopago-chile/WooMercadoPagosChile.php 77% from 13 tests

This is the main PHP file of "Woo MercadoPago Chile" version 1.4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ecommerce-mercadopago-chile.php" instead of "WooMercadoPagosChile.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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 detected2,077 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP264615311,703
Markdown2880282
JSON31081
INI1005
JavaScript1243
make1002
CSS1051

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.18
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods79
▷ Static methods1417.72%
▷ Public methods7594.94%
▷ Protected methods00.00%
▷ Private methods45.06%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
There were not PNG files found in your plugin