78% checkout-mestres-wp

Code Review | Checkout Mestres WP

WordPress plugin Checkout Mestres WP scored78%from 54 tests.

About plugin

  • Plugin page: checkout-mestres-wp
  • Plugin version: 7.1.9.6
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 21, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 290
  • Update frequency: every 2.6 days
  • Top authors: mestresdowp (100%)

Code review

54 tests

User reviews

80 reviews

Install metrics

800+ active /50,351 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.13ms] Passed 4 tests

An overview of server-side resources used by Checkout Mestres WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.30 ▼3.31
Dashboard /wp-admin3.32 ▲0.0246.38 ▼6.76
Posts /wp-admin/edit.php3.38 ▲0.0150.48 ▲3.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0191.55 ▼1.77
Media Library /wp-admin/upload.php3.25 ▲0.0137.70 ▲5.94

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 201 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Checkout Mestres WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲3914.60 ▲0.211.81 ▲0.1742.54 ▼0.98
Dashboard /wp-admin2,198 ▲185.59 ▼0.0090.99 ▼3.0040.92 ▼4.91
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0139.23 ▼0.8634.76 ▲2.17
Add New Post /wp-admin/post-new.php1,526 ▼023.84 ▲0.91592.53 ▼44.4246.57 ▼2.17
Media Library /wp-admin/upload.php1,400 ▲64.20 ▲0.0297.88 ▼4.4243.08 ▼0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/checkout-mestres-wp/backend/core/newsletter-remove-mail.php
    • > /wp-content/plugins/checkout-mestres-wp/backend/core/verify-open-mail.php
    • > /wp-content/plugins/checkout-mestres-wp/authentication/melhorenvio/index.php
    • > /wp-content/plugins/checkout-mestres-wp/authentication/melhor-envio.php
  • 102× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/checkout-mestres-wp/backend/core/shipping/frenet.php:2
    • > WordPress database error Table 'potrivit.wp_cwmp_newsletter_send' doesn't exist for query SHOW FULL COLUMNS FROM `wp_cwmp_newsletter_send`
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/checkout-mestres-wp/frontend/core/shortcodes/gerencianet.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/checkout-mestres-wp/backend/core/shipping/melhorenvio.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/checkout-mestres-wp/frontend/core/shortcodes/cart.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/checkout-mestres-wp/frontend/core/shortcodes/mp.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/checkout-mestres-wp/backend/includes/html/licensa.checkout.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/checkout-mestres-wp/backend/core/cwmp-reset.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/checkout-mestres-wp/backend/includes/html/comunicacao.email-edit.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/checkout-mestres-wp/backend/core/cwmp-admin-custom-field-order.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === checkout-mestres-wp === )
Please take inspiration from this readme.txt

checkout-mestres-wp/checkout-woocommerce-mestres-wp.php 92% from 13 tests

The primary PHP file in "Checkout Mestres WP" version 7.1.9.6 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("checkout-mestres-wp.php" instead of "checkout-woocommerce-mestres-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected25,613 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP13052624313,298
JavaScript11176528,596
CSS1457102,438
PO File153531,226
SVG90055

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods66
▷ Static methods00.00%
▷ Public methods5481.82%
▷ Protected methods1218.18%
▷ Private methods00.00%
Functions261
▷ Named functions25999.23%
▷ Anonymous functions20.77%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
26 PNG files occupy 0.36MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/flags.png69.20KB23.42KB▼ 66.16%
assets/images/ico-clock.png0.73KB0.49KB▼ 32.30%
assets/images/ico-close-cart.png0.76KB0.47KB▼ 38.61%
backend/assets/images/cwmp_icon_mail_color.png0.58KB0.38KB▼ 33.39%
assets/images/ico-lock.png0.44KB0.36KB▼ 18.26%