94% tigo-money-payment-gateway

Code Review | Tigo Money Payment Gateway

WordPress plugin Tigo Money Payment Gateway scored 94% from 54 tests.

About plugin

  • Plugin page: tigo-money-paymen...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8.1
  • WordPress version: 5.8.1
  • First release: May 11, 2017
  • Latest release: Aug 31, 2017
  • Number of updates: 14
  • Update frequency: every 9.6 days
  • Top authors: deniscordero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 958 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼139.26ms] Passed 4 tests

A check of server-side resources used by Tigo Money Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0040.85 ▲5.47
Dashboard /wp-admin3.06 ▲0.0053.74 ▲5.24
Posts /wp-admin/edit.php3.11 ▲0.0050.63 ▲8.59
Add New Post /wp-admin/post-new.php5.42 ▼0.0295.32 ▼562.41
Media Library /wp-admin/upload.php3.00 ▲0.0031.75 ▼5.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Tigo Money Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.81 ▲0.2611.09 ▲0.9249.16 ▼2.52
Dashboard /wp-admin2,973 ▲425.88 ▼0.06144.43 ▼7.14121.60 ▲5.50
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0067.64 ▼3.4299.11 ▲2.97
Add New Post /wp-admin/post-new.php1,683 ▼018.78 ▲0.33392.42 ▼2.17115.07 ▼0.13
Media Library /wp-admin/upload.php1,810 ▼05.00 ▼0.02164.94 ▲11.72117.82 ▼13.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tigo-money-payment-gateway/lib/tigo-money-payment-gateway-helpers.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/tigo-money-payment-gateway/lib/class-tigo-money-payment-gateway.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: payment gateway, payment, woocommerce

tigo-money-payment-gateway/tigo-money-payment-gateway.php Passed 13 tests

The main PHP script in "Tigo Money Payment Gateway" version 1.1 is automatically included on every request by WordPress
81 characters long description:
Tigo Money Payment Gateway allows Tigo Money Partners to connect to our services.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected901 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5165259901

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity42.00
▷ Minimum class complexity29.00
▷ Maximum class complexity55.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods1650.00%
▷ Protected methods1650.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/woocommerce-tigomoney.png4.21KB1.76KB▼ 58.14%