84% payment-integration-wompi

Code Review | Payment Integration Wompi

WordPress plugin Payment Integration Wompi scored84%from 54 tests.

About plugin

  • Plugin page: payment-integrati...
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2020
  • Latest release: Sep 14, 2023
  • Number of updates: 7
  • Update frequency: every 192.3 days
  • Top authors: saulmorales (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /16,925 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Payment Integration Wompi
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.07 ▼7.94
Dashboard /wp-admin3.32 ▲0.0146.43 ▼5.38
Posts /wp-admin/edit.php3.37 ▲0.0149.35 ▼0.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.19 ▼7.82
Media Library /wp-admin/upload.php3.24 ▲0.0137.26 ▲2.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Payment Integration Wompi
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.19 ▼1.461.69 ▼0.5740.64 ▼4.37
Dashboard /wp-admin2,212 ▲245.89 ▲0.98106.09 ▲0.6644.66 ▲5.40
Posts /wp-admin/edit.php2,095 ▲61.98 ▼0.0642.12 ▲6.0736.10 ▲3.07
Add New Post /wp-admin/post-new.php1,543 ▲1023.16 ▲0.00645.64 ▼50.0853.29 ▲1.09
Media Library /wp-admin/upload.php1,385 ▼34.26 ▲0.0398.60 ▼14.0142.18 ▼6.13

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_enqueue_js() in wp-content/plugins/payment-integration-wompi/includes/admin/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payment-integration-wompi/includes/class-gateway-wompi-wwp.php:4

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can take inspiration from this readme.txt

payment-integration-wompi/payment-integration-wompi.php 92% from 13 tests

The entry point to "Payment Integration Wompi" version 2.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin3,012 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript127132,709
PHP45551303

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.50
▷ Minimum class complexity8.00
▷ Maximum class complexity9.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants1
▷ Global constants1100.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
No PNG files were detected