83% algo-payments-by-andpay

Code Review | Andpay

WordPress plugin Andpay scored83%from 54 tests.

About plugin

  • Plugin page: algo-payments-by-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Dec 15, 2021
  • Number of updates: 7
  • Update frequency: every 4.6 days
  • Top authors: andpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,871 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▲1.06ms] Passed 4 tests

An overview of server-side resources used by Andpay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3145.03 ▲1.37
Dashboard /wp-admin3.60 ▲0.3052.46 ▲2.08
Posts /wp-admin/edit.php3.65 ▲0.3053.80 ▲3.82
Add New Post /wp-admin/post-new.php6.12 ▲0.24103.74 ▼3.05
Media Library /wp-admin/upload.php3.46 ▲0.2442.94 ▲5.06

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 392 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Andpay: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.291.89 ▲0.0340.40 ▼4.13
Dashboard /wp-admin2,201 ▲275.58 ▲0.0091.53 ▼9.0442.39 ▲1.11
Posts /wp-admin/edit.php2,107 ▲71.95 ▼0.0639.84 ▲1.9034.05 ▲1.78
Add New Post /wp-admin/post-new.php1,532 ▲323.30 ▲0.16660.97 ▲34.6068.53 ▼5.45
Media Library /wp-admin/upload.php1,406 ▲64.21 ▲0.0199.85 ▼0.8246.75 ▲4.15

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
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 171× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Formatter' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/message/src/Formatter/SimpleFormatter.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/laminas/laminas-diactoros/src/Response.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientInterface' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/httplug/src/HttpClient.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Exception\\HttpException' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/client-common/src/Exception/CircularRedirectionException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\MessageFactory' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/message/src/MessageFactory/DiactorosMessageFactory.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\Plugin' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/client-common/src/Plugin/HeaderSetPlugin.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Exception' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/discovery/src/Exception/NotFoundException.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/symfony/options-resolver/Exception/MissingOptionsException.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/algo-payments-by-andpay/vendor/andpay/andpay-api-php/vendor/php-http/message/src/Authentication/Chain.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: algopay, algorand, algorand payments, usdc, yldy...

algo-payments-by-andpay/woocommerce-gateway-andpay.php 69% from 13 tests

The main PHP file in "Andpay" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("algo-payments-by-andpay.php" instead of "woocommerce-gateway-andpay.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected22,326 lines of code in 363 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.87
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
▷ Abstract classes52.43%
▷ Concrete classes20197.57%
▷ Final classes10250.75%
▷ Static methods19116.57%
▷ Public methods1,00787.34%
▷ Protected methods342.95%
▷ Private methods1129.71%
▷ Named functions7335.27%
▷ Anonymous functions13464.73%
▷ Global constants49.30%
▷ Class constants3990.70%
▷ Public constants3897.44%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/icon.png11.23KB4.58KB▼ 59.23%
public/images/currency-yldy.png17.79KB9.13KB▼ 48.66%
public/images/currency-smile.png25.69KB11.30KB▼ 56.02%
public/images/currency-eure.png27.76KB10.75KB▼ 61.29%
public/images/currency-planet.png242.05KB72.08KB▼ 70.22%