10% xumm-payments-for-woocommerce

Code Review | XUMM for WooCommerce

WordPress plugin XUMM for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: xumm-payments-for...
  • Plugin version: 1.0.2
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2020
  • Latest release: Sep 22, 2023
  • Number of updates: 26
  • Update frequency: every 40.1 days
  • Top authors: xumm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,273 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/xumm-payments-for-woocommerce/libraries/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 7.4.16.

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.59ms] Passed 4 tests

Server-side resources used by XUMM for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.94 ▼36.32
Dashboard /wp-admin2.05 ▼1.264.72 ▼44.06
Posts /wp-admin/edit.php2.05 ▼1.315.22 ▼45.03
Add New Post /wp-admin/post-new.php2.05 ▼3.845.25 ▼84.93
Media Library /wp-admin/upload.php2.05 ▼1.187.57 ▼27.57

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 68 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for XUMM for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,235 ▼1,55110.00 ▼4.175.21 ▲3.4739.57 ▲0.03
Dashboard /wp-admin504 ▼1,6731.36 ▼4.3013.19 ▼77.3917.68 ▼19.99
Posts /wp-admin/edit.php502 ▼1,5981.51 ▼0.466.45 ▼30.9117.92 ▼15.71
Add New Post /wp-admin/post-new.php453 ▼1,0751.71 ▼21.5920.17 ▼604.677.07 ▼55.83
Media Library /wp-admin/upload.php512 ▼8881.71 ▼2.4622.48 ▼80.1118.71 ▼24.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User error in wp-content/plugins/xumm-payments-for-woocommerce/libraries/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 7.4.16.
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/xumm-payments-for-woocommerce/public/partials/xumm-for-woocommerce-public-display.php
  • 516× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Xrpl\\XummSdkPhp\\Exception\\XummException' not found in wp-content/plugins/xumm-payments-for-woocommerce/libraries/xrpl/xumm-sdk-php/src/Exception/Http/XummBadResponseException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'React\\Dns\\Query\\ExecutorInterface' not found in wp-content/plugins/xumm-payments-for-woocommerce/libraries/react/dns/src/Query/SelectiveTransportExecutor.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Serializer\\Exception\\RuntimeException' not found in wp-content/plugins/xumm-payments-for-woocommerce/libraries/symfony/serializer/Exception/CircularReferenceException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'React\\Socket\\ConnectorInterface' not found in wp-content/plugins/xumm-payments-for-woocommerce/libraries/react/socket/src/HappyEyeBallsConnector.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/xumm-payments-for-woocommerce/libraries/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php:32
    • > PHP Parse error
      syntax error, unexpected ')', expecting '|' or variable (T_VARIABLE) in wp-content/plugins/xumm-payments-for-woocommerce/libraries/symfony/property-info/PropertyInfoCacheExtractor.php on line 77
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/xumm-payments-for-woocommerce/libraries/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php on line 195
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/xumm-payments-for-woocommerce/libraries/evenement/evenement/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/xumm-payments-for-woocommerce/libraries/evenement/evenement/examples/benchmark-remove-listener-once.php on line 18
    • > PHP Parse error
      syntax error, unexpected ':', expecting ')' in wp-content/plugins/xumm-payments-for-woocommerce/libraries/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php on line 46
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/xumm-payments-for-woocommerce/libraries/guzzlehttp/guzzle/src/Exception/ConnectException.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: ledger, crypto, xumm, cryptocurrency, xrp

xumm-payments-for-woocommerce/xumm-payments-for-woocommerce.php 92% from 13 tests

The main PHP script in "XUMM for WooCommerce" version 1.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin81,203 lines of code in 922 files:
LanguageFilesBlank linesComment linesLines of code
PHP78312,41726,16163,823
Markdown614,196011,845
JSON41004,248
PO File2174217390
YAML8220217
JavaScript24965164
SVG310135
Cucumber10190113
XSD1140101
XML562100
Bourne Shell314250
make15017
CSS2080

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity10.84
▷ Minimum class complexity1.00
▷ Maximum class complexity294.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces139
Interfaces115
Traits18
Classes586
▷ Abstract classes183.07%
▷ Concrete classes56896.93%
▷ Final classes25645.07%
Methods3,754
▷ Static methods45112.01%
▷ Public methods3,04681.14%
▷ Protected methods2266.02%
▷ Private methods48212.84%
Functions659
▷ Named functions19729.89%
▷ Anonymous functions46270.11%
Constants457
▷ Global constants173.72%
▷ Class constants44096.28%
▷ Public constants33977.05%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.20MB with 0.20MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/public/images/ripple-1s-200px.png201.52KB1.24KB▼ 99.38%