83% paga-con-modo

Code Review | Paga con MODO

WordPress plugin Paga con MODO scored83%from 54 tests.

About plugin

  • Plugin page: paga-con-modo
  • Plugin version: 1.0.19
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2021
  • Latest release: Oct 21, 2023
  • Number of updates: 20
  • Update frequency: every 34.7 days
  • Top authors: ingenieriamodo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲3.48ms] Passed 4 tests

This is a short check of server-side resources used by Paga con MODO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.29 ▲3.37
Dashboard /wp-admin3.31 ▲0.0055.48 ▲5.45
Posts /wp-admin/edit.php3.36 ▲0.0049.17 ▲2.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.57 ▲11.37
Media Library /wp-admin/upload.php3.23 ▲0.0035.85 ▲2.27

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

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

Browser metrics Passed 4 tests

Paga con MODO: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.281.66 ▼0.2545.67 ▲2.85
Dashboard /wp-admin2,195 ▲155.62 ▼0.05101.56 ▲18.8946.65 ▲3.95
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0044.29 ▲9.2936.45 ▼0.29
Add New Post /wp-admin/post-new.php1,527 ▲121.20 ▼1.90674.71 ▼4.0952.45 ▲5.15
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.0294.31 ▼4.1743.04 ▼1.84

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 detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 Ecomerciar\\MODO\\Gateway\\apply_filters() in wp-content/plugins/paga-con-modo/Gateway/settings.php:12
    • > PHP Fatal error
      Trait 'Ecomerciar\\MODO\\Helper\\LoggerTrait' not found in wp-content/plugins/paga-con-modo/Helper/Helper.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Checkout.) image required
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === paga-con-modo === )
The official readme.txt might help

paga-con-modo/modo.php 85% from 13 tests

The primary PHP file in "Paga con MODO" version 1.0.19 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paga-con-modo.php" instead of "modo.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,460 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP171825811,154
SVG200123
JavaScript170102
YAML223176
INI1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.27
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces5
Interfaces1
Traits5
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods71
▷ Static methods3954.93%
▷ Public methods6490.14%
▷ Protected methods22.82%
▷ Private methods57.04%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 0.30MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/banner-1544x500-rtl.png66.96KB30.59KB▼ 54.31%
assets/img/MODO-banner.png19.82KB8.75KB▼ 55.84%
assets/img/MODO-icon-white.png21.15KB11.42KB▼ 45.99%
assets/img/MODO-logo-xs.png7.01KB3.44KB▼ 50.99%
assets/img/checkout_05.png5.49KB3.54KB▼ 35.43%