93% aditum-gateway

Code Review | Aditum Gateway

WordPress plugin Aditum Gateway scored 93% from 54 tests.

About plugin

  • Plugin page: aditum-gateway
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.2
  • WordPress version: 5.9.2
  • First release: Jan 11, 2022
  • Latest release: Jan 12, 2022
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: pluginsaditum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 58 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼295.68ms] Passed 4 tests

An overview of server-side resources used by Aditum Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1860.64 ▼0.06
Dashboard /wp-admin3.52 ▲0.1137.56 ▼34.99
Posts /wp-admin/edit.php3.75 ▲0.1143.41 ▲3.74
Add New Post /wp-admin/post-new.php6.99 ▲0.02100.86 ▼1,150.86
Media Library /wp-admin/upload.php3.40 ▲0.1128.27 ▲3.18

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 206 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Aditum Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.87 ▲0.526.30 ▼0.202.88 ▲0.30
Dashboard /wp-admin2,895 ▲415.99 ▼0.20127.22 ▼10.63210.17 ▲43.90
Posts /wp-admin/edit.php2,657 ▼363.24 ▲0.0164.16 ▼26.08145.79 ▼47.03
Add New Post /wp-admin/post-new.php1,690 ▲2920.45 ▼2.26454.48 ▲55.98179.13 ▲2.81
Media Library /wp-admin/upload.php1,698 ▲95.51 ▼0.01185.06 ▲47.99204.62 ▲20.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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
Good news, no errors were detected

SRP 50% 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
  • 74× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Picqer\\Barcode\\BarcodeGenerator' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorHTML.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/aditum-gateway/classes/AditumBoleto.class.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Picqer\\Barcode\\Types\\TypeInterface' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeEanUpcBase.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Picqer\\Barcode\\Types\\TypeInterface' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeUpcExtension2.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Picqer\\Barcode\\Types\\TypeInterface' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeCode11.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Picqer\\Barcode\\Types\\TypeEanUpcBase' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeEan8.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Picqer\\Barcode\\Exceptions\\BarcodeException' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Exceptions/InvalidFormatException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/aditum-gateway/vendor/aditum-payments/aditum-api-sdk-php/tests/ConfigurationTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Picqer\\Barcode\\Types\\TypeInterface' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeCode93.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Picqer\\Barcode\\Types\\TypeInterface' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeCode128.php:18

User-side errors Passed 1 test

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


Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in aditum-gateway/assets to your readme.txt
Please take inspiration from this readme.txt

aditum-gateway/aditum-payment.php 69% from 13 tests

The main PHP script in "Aditum Gateway" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "7.2")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("aditum-gateway.php" instead of "aditum-payment.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.2")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected10,160 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.76
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
▷ Abstract classes1314.61%
▷ Concrete classes7685.39%
▷ Final classes00.00%
▷ Static methods3010.60%
▷ Public methods25991.52%
▷ Protected methods217.42%
▷ Private methods31.06%
▷ Named functions525.00%
▷ Anonymous functions1575.00%
▷ Global constants00.00%
▷ Class constants108100.00%
▷ Public constants10799.07%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/screenshot-3.png21.52KB8.71KB▼ 59.50%
assets/icon.png65.94KB22.29KB▼ 66.20%
docs/screenshot-0.png54.84KB20.86KB▼ 61.96%
docs/screenshot-1.png12.91KB6.00KB▼ 53.51%
docs/screenshot-2.png12.20KB5.32KB▼ 56.40%