10% ivendpay-payments

Code Review | ivendPay payments

WordPress plugin ivendPay payments scored10%from 54 tests.

About plugin

  • Plugin page: ivendpay-payments
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 17
  • Update frequency: every 22.5 days
  • Top authors: ivendpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/ivendpay-payments/includes/class-gateway.php+12
    Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/ivendpay-payments/includes/class-gateway.php:12
    Stack trace:
    #0 wp-content/plugins/ivendpay-payments/vendor/composer/ClassLoader.php(444): include()
    #1 wp-content/plugins/ivendpay-payments/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
    #2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
    #3 wp-includes/class-wp-hook.php(310): spl_autoload_call()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/includes/plugin.php(693): do_action()

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

Analyzing server-side resources used by ivendPay payments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.32 ▼4.35
Dashboard /wp-admin3.31 ▲0.0045.85 ▼3.54
Posts /wp-admin/edit.php3.36 ▲0.0048.69 ▼4.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.95 ▼2.37
Media Library /wp-admin/upload.php3.23 ▲0.0033.25 ▼2.70

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for ivendPay payments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.35 ▲0.011.68 ▲0.0539.21 ▼3.23
Dashboard /wp-admin2,195 ▲155.54 ▼0.1189.50 ▼4.0736.78 ▼5.99
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0039.49 ▼1.6635.35 ▼1.52
Add New Post /wp-admin/post-new.php1,526 ▼923.10 ▼1.84670.23 ▲64.3254.59 ▼6.73
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.01101.34 ▲4.7142.07 ▼0.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ivendpay-payments/assets/partials/step2.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ivendpay-payments/assets/partials/failed.php:4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 16
    • > PHP Notice
      Undefined variable: listCoins in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ivendpay-payments/assets/partials/success.php:4
    • > PHP Notice
      Undefined variable: listCoins in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 28
    • > PHP Notice
      Undefined variable: listCoins in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ivendpay-payments/assets/partials/step3.php:6
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 45
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 28
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/ivendpay-payments/assets/partials/step2.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

ivendpay-payments/ivendpay-payments.php 85% from 13 tests

This is the main PHP file of "ivendPay payments" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("5.8" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,807 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP162964291,263
SVG300672
CSS17615501
JavaScript36065351
JSON50020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.71
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods68
▷ Static methods811.76%
▷ Public methods6595.59%
▷ Protected methods22.94%
▷ Private methods11.47%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/media/usdt-bep20.png11.76KB4.25KB▼ 63.82%
assets/media/usdt-poly20.png12.17KB4.36KB▼ 64.18%
assets/media/ivendpay.png24.92KB10.55KB▼ 57.65%
assets/media/usdt-erc20.png11.83KB4.35KB▼ 63.25%
assets/media/usdt-trc20.png11.79KB4.34KB▼ 63.22%