100% 1stpaygateway-for-woocommerce

Code Review | 1stPayGateway for WooCommerce

WordPress plugin 1stPayGateway for WooCommerce scored 100% 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: 5.9.2
  • 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 / 973 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by 1stPayGateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0160.11 ▲5.04
Dashboard /wp-admin3.41 ▲0.0142.07 ▲6.12
Posts /wp-admin/edit.php3.65 ▲0.0143.79 ▲2.72
Add New Post /wp-admin/post-new.php6.88 ▼0.0894.80 ▼1,205.10
Media Library /wp-admin/upload.php3.30 ▲0.0124.78 ▼2.37

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

1stPayGateway for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲5316.20 ▲0.355.62 ▼0.602.94 ▲0.53
Dashboard /wp-admin2,904 ▲246.40 ▼0.18132.58 ▼8.08157.24 ▼6.84
Posts /wp-admin/edit.php2,688 ▲33.42 ▼0.0162.64 ▼3.05146.66 ▲6.44
Add New Post /wp-admin/post-new.php1,661 ▼5616.49 ▼5.69397.46 ▼23.39160.22 ▼1.59
Media Library /wp-admin/upload.php1,695 ▼35.75 ▲0.03134.49 ▼7.88183.78 ▼2.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output 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 96% 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
9 plugin tags: payment, credit card, woocommerce, checkout, merchant...

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

The primary PHP file in "1stPayGateway for WooCommerce" version 1.3.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("1stpaygateway-for-woocommerce.php" instead of "1stpaygateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous 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

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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_my_account.PNG43.77KB20.49KB▼ 53.19%
assets/capture_thankyou_page.PNG272.92KB64.21KB▼ 76.47%