83% aditum-gateway

Code Review | Aditum Gateway

WordPress plugin Aditum Gateway scored83%from 54 tests.

About plugin

  • Plugin page: aditum-gateway
  • Plugin version: 1.4.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 32
  • Update frequency: every 21.6 days
  • Top authors: pluginsaditum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,887 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.96ms] Passed 4 tests

Analyzing server-side resources used by Aditum Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.97 ▼2.91
Dashboard /wp-admin3.42 ▲0.0749.23 ▼13.58
Posts /wp-admin/edit.php3.53 ▲0.1750.60 ▲2.98
Add New Post /wp-admin/post-new.php6.00 ▲0.1183.06 ▼17.26
Media Library /wp-admin/upload.php3.34 ▲0.1134.48 ▲1.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 213 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Aditum Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.54 ▲0.201.65 ▼0.5036.61 ▼6.80
Dashboard /wp-admin2,198 ▲205.65 ▼0.0790.07 ▼25.2938.71 ▼6.66
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0538.16 ▲1.4435.56 ▲1.79
Add New Post /wp-admin/post-new.php1,526 ▼323.42 ▲0.14573.00 ▼55.3755.51 ▲7.11
Media Library /wp-admin/upload.php1,394 ▼64.25 ▲0.0695.60 ▼0.0143.06 ▲2.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 81× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Picqer\\Barcode\\Types\\TypeUpcExtension2' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeUpcExtension5.php:11
    • > 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\\Exceptions\\BarcodeException' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Exceptions/UnknownTypeException.php:5
    • > PHP Fatal error
      require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/generate-verified-files.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Picqer\\Barcode\\Types\\TypeCode39' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/src/Types/TypeCode39Extended.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/tests/PharmacodeTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/aditum-gateway/vendor/picqer/php-barcode-generator/tests/VerifiedBarcodeTest.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/aditum-gateway/templates/thankyou/aditum_pix.php on line 5
    • > 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/TypeCodabar.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in aditum-gateway/assets to your readme.txt
You can take inspiration from this readme.txt

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

The principal PHP file in "Aditum Gateway" v. 1.4.6 is loaded by WordPress automatically on each request
It is important to fix the following:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("aditum-gateway.php" instead of "aditum-payment.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "5.2")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4" instead of "7.2")

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
Everything looks great! No dangerous files found in this plugin10,838 lines of code in 193 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101,3551,2136,819
SVG52011,824
Markdown143180848
JavaScript49294778
JSON400230
HTML400194
CSS11089
XML20034
YAML29022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces12
Interfaces1
Traits0
Classes93
▷ Abstract classes1313.98%
▷ Concrete classes8086.02%
▷ Final classes00.00%
Methods304
▷ Static methods3611.84%
▷ Public methods27991.78%
▷ Protected methods216.91%
▷ Private methods41.32%
Functions20
▷ Named functions525.00%
▷ Anonymous functions1575.00%
Constants109
▷ Global constants00.00%
▷ Class constants109100.00%
▷ Public constants10899.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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-0.png54.84KB20.86KB▼ 61.96%
assets/icon.png65.94KB22.29KB▼ 66.20%
docs/screenshot-3.png21.52KB8.71KB▼ 59.50%
docs/screenshot-1.png12.91KB6.00KB▼ 53.51%
docs/screenshot-2.png12.20KB5.32KB▼ 56.40%