90% woo-idpay-gateway

Code Review | IDPay Payment Gateway for Woocommerce

WordPress plugin IDPay Payment Gateway for Woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: woo-idpay-gateway
  • Plugin version: 2.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2018
  • Latest release: Nov 6, 2022
  • Number of updates: 27
  • Update frequency: every 53.4 days
  • Top authors: idpayir (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /45,904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.56ms] Passed 4 tests

This is a short check of server-side resources used by IDPay Payment Gateway for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.87 ▼6.73
Dashboard /wp-admin3.40 ▲0.0646.85 ▼17.16
Posts /wp-admin/edit.php3.51 ▲0.1645.14 ▲2.58
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.02 ▼4.86
Media Library /wp-admin/upload.php3.32 ▲0.1034.97 ▼1.48

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for IDPay Payment Gateway for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.121.64 ▼0.3136.69 ▼1.99
Dashboard /wp-admin2,192 ▲185.62 ▼0.0588.14 ▼0.3636.27 ▼10.34
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0135.80 ▲0.3330.41 ▼4.21
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.00608.35 ▼16.7794.84 ▲47.68
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.0798.07 ▼5.8344.25 ▼0.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
There were no plugin tags found

woo-idpay-gateway/woo-idpay-gateway.php Passed 13 tests

This is the main PHP file of "IDPay Payment Gateway for Woocommerce" version 2.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
45 characters long description:
IDPay secure payment gateway for Woocommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin533 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4121194533

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods857.14%
▷ Protected methods00.00%
▷ Private methods642.86%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png2.42KB1.77KB▼ 26.87%