90% 1stpaygateway-for-woocommerce

Code Review | 1stPayGateway for WooCommerce

WordPress plugin 1stPayGateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: 1stpaygateway-for...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-5.7.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2016
  • Latest release: Jul 6, 2021
  • Number of updates: 28
  • Update frequency: every 59.5 days
  • Top authors: supportgoemerchant (67.86%)kdemoura (35.71%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.04ms] Passed 4 tests

Server-side resources used by 1stPayGateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.71 ▲2.27
Dashboard /wp-admin3.32 ▲0.0247.62 ▼1.07
Posts /wp-admin/edit.php3.37 ▲0.0153.68 ▲4.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.21 ▼1.36
Media Library /wp-admin/upload.php3.24 ▲0.0135.94 ▲4.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by 1stPayGateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.82 ▲0.0743.65 ▼0.09
Dashboard /wp-admin2,209 ▲354.83 ▼1.0795.74 ▼12.2639.80 ▼9.16
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0239.64 ▼2.4535.02 ▼0.38
Add New Post /wp-admin/post-new.php1,543 ▲2918.31 ▲0.80642.18 ▼51.5953.35 ▼0.77
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.1296.80 ▼10.4142.50 ▼0.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: merchant, checkout, woocommerce, plugin, payment...

1stpaygateway-for-woocommerce/1stpaygateway.php 92% from 13 tests

"1stPayGateway for WooCommerce" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("1stpaygateway-for-woocommerce.php" instead of "1stpaygateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,159 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31562471,059
Markdown123050
JavaScript18531
XML20019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity41.17
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods00.00%
▷ Public methods5498.18%
▷ Protected methods11.82%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants51
▷ Global constants00.00%
▷ Class constants51100.00%
▷ Public constants51100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/capture_checkout_form.PNG46.30KB16.00KB▼ 65.45%
assets/capture_thankyou_page.PNG272.92KB64.21KB▼ 76.47%
assets/capture_my_account.PNG43.77KB20.49KB▼ 53.19%