89% raypay-payment-gateway-for-woocommerce

Code Review | RayPay Payment Gateway for Woocommerce

WordPress plugin RayPay Payment Gateway for Woocommerce scored 89% from 54 tests.

About plugin

  • Plugin page: raypay-payment-ga...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 17, 2021
  • Latest release: May 17, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: hanieh729 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by RayPay Payment Gateway for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.96 ▼6.65
Dashboard /wp-admin3.31 ▲0.0145.38 ▼7.92
Posts /wp-admin/edit.php3.36 ▲0.0047.03 ▼4.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.45 ▼4.04
Media Library /wp-admin/upload.php3.23 ▲0.0034.68 ▼1.70

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for RayPay Payment Gateway for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.211.85 ▲0.0740.58 ▼4.45
Dashboard /wp-admin2,209 ▲215.86 ▲0.94108.50 ▼5.6639.51 ▼2.60
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0239.63 ▲0.6936.66 ▲1.64
Add New Post /wp-admin/post-new.php1,534 ▲123.10 ▼0.05626.05 ▼31.6760.55 ▲2.92
Media Library /wp-admin/upload.php1,385 ▼64.23 ▼0.0393.25 ▼0.3242.41 ▲1.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce, payment, gateway, raypay

raypay-payment-gateway-for-woocommerce/woo-raypay-gateway.php 85% from 13 tests

The main PHP file in "RayPay Payment Gateway for Woocommerce" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("raypay-payment-gateway-for-woocommerce.php" instead of "woo-raypay-gateway.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin509 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4124177385
PO File13946124

PHP code Passed 2 tests

Analyzing 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.22
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods763.64%
▷ Protected methods00.00%
▷ Private methods436.36%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png7.20KB3.59KB▼ 50.13%