90% payment-gateways-by-currency-for-woocommerce

Code Review | Payment Gateway Currency for WooCommerce

WordPress plugin Payment Gateway Currency for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: payment-gateways-...
  • Plugin version: 3.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Jul 21, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 49
  • Update frequency: every 25.1 days
  • Top authors: algoritmika (67.35%)wpcodefactory (34.69%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /9,099 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Payment Gateway Currency for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.33 ▼1.90
Dashboard /wp-admin3.32 ▲0.0248.95 ▼1.69
Posts /wp-admin/edit.php3.37 ▲0.0247.26 ▼1.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.58 ▼4.08
Media Library /wp-admin/upload.php3.25 ▲0.0235.57 ▲3.53

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway Currency for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.69 ▲0.431.72 ▲0.1437.81 ▼2.85
Dashboard /wp-admin2,192 ▲155.60 ▲0.0291.55 ▼4.1242.40 ▼12.82
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0039.35 ▼2.9935.77 ▼1.76
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.45592.93 ▼105.4254.45 ▲2.29
Media Library /wp-admin/upload.php1,400 ▲64.20 ▲0.0794.14 ▼2.4439.40 ▼0.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Restrict currencies.), #2 (Convert currencies.)
The official readme.txt might help

payment-gateways-by-currency-for-woocommerce/payment-gateways-by-currency-for-woocommerce.php Passed 13 tests

"Payment Gateway Currency for WooCommerce" version 3.8.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
64 characters long description:
Manage currencies for WooCommerce payment gateways. Beautifully.

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
No dangerous file extensions were detected2,887 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP214171,5322,865
JavaScript231012
Markdown1609
JSON1001
Sass1010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.76
Average class complexity27.60
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods154
▷ Static methods10.65%
▷ Public methods154100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected