10% rapyd-payments

Code Review | Rapyd Payment Extension for WooCommerce

WordPress plugin Rapyd Payment Extension for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: rapyd-payments
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: Jan 24, 2021
  • Latest release: Dec 6, 2022
  • Number of updates: 21
  • Update frequency: every 32.7 days
  • Top authors: yuliaz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /13,926 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 had errors
    • > Error in wp-content/plugins/rapyd-payments/includes/abstracts/abstract-wc-rapyd-payment-gateway.php+13
    Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/rapyd-payments/includes/abstracts/abstract-wc-rapyd-payment-gateway.php:13
    Stack trace:
    #0 wp-content/plugins/rapyd-payments/rapyd-payments-plugin-for-woocommerce.php(47): require_once()
    #1 wp-includes/class-wp-hook.php(310): rapyd_activate()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.02MB] [CPU: ▼2.37ms] Passed 4 tests

A check of server-side resources used by Rapyd Payment Extension for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.0045.34 ▼0.73
Dashboard /wp-admin3.57 ▼0.0765.20 ▼0.52
Posts /wp-admin/edit.php3.68 ▲0.0051.07 ▲1.47
Add New Post /wp-admin/post-new.php6.15 ▲0.0084.89 ▼9.69
Media Library /wp-admin/upload.php3.49 ▲0.0041.57 ▲5.48

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Rapyd Payment Extension for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.052.12 ▲0.5144.44 ▲3.39
Dashboard /wp-admin2,192 ▲125.58 ▼0.0993.28 ▼2.2840.02 ▼3.00
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0133.58 ▼5.5834.70 ▼3.48
Add New Post /wp-admin/post-new.php1,526 ▼017.61 ▼0.17695.88 ▼11.7359.26 ▲4.20
Media Library /wp-admin/upload.php1,403 ▲34.24 ▼0.03100.01 ▼9.6345.00 ▲1.28

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: bank transfer bank redirect, cash, credit card, ewallet

rapyd-payments/rapyd-payments-plugin-for-woocommerce.php 77% from 13 tests

The main file in "Rapyd Payment Extension for WooCommerce" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2" instead of "4.4")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rapyd-payments.php" instead of "rapyd-payments-plugin-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,413 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File187389182,383
PHP1118354851
JavaScript1230179

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity11.88
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods60
▷ Static methods23.33%
▷ Public methods5795.00%
▷ Protected methods00.00%
▷ Private methods35.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants32
▷ Global constants721.88%
▷ Class constants2578.12%
▷ Public constants25100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 1.40MB with 0.81MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png148.16KB42.02KB▼ 71.64%
assets/icon-128x128.png7.90KB3.94KB▼ 50.15%
assets/screenshot-3.png32.71KB12.53KB▼ 61.68%
assets/icon-255x128.png12.93KB6.76KB▼ 47.71%
assets/screenshot-1.png230.69KB95.84KB▼ 58.45%