84% payarc-payment-gateway

Code Review | PAYARC Payment Gateway

WordPress plugin PAYARC Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: payarc-payment-ga...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 26, 2022
  • Latest release: May 23, 2023
  • Number of updates: 6
  • Update frequency: every 69.8 days
  • Top authors: payarc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /792 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.01MB] [CPU: ▼5.98ms] Passed 4 tests

A check of server-side resources used by PAYARC Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0236.65 ▼4.09
Dashboard /wp-admin3.32 ▲0.0245.07 ▼8.56
Posts /wp-admin/edit.php3.37 ▲0.0147.30 ▲0.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.94 ▼11.60
Media Library /wp-admin/upload.php3.24 ▲0.0136.98 ▲2.37

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PAYARC Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.25 ▼0.131.71 ▲0.0142.47 ▲1.56
Dashboard /wp-admin2,206 ▲185.88 ▲0.95109.39 ▲7.7236.68 ▼9.03
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0147.75 ▲11.0448.96 ▲15.28
Add New Post /wp-admin/post-new.php1,514 ▼2817.55 ▼0.77678.43 ▲78.6961.01 ▲1.31
Media Library /wp-admin/upload.php1,388 ▼04.13 ▼0.0295.14 ▼0.5740.58 ▼3.21

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 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 50% from 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
Please fix the following
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:31
    • > PHP Notice
      Undefined variable: index in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-profile-field-customer-id.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-profile-section.php:26
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php:88
    • > PHP Notice
      Undefined variable: input_name in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'SkyVerge\\WooCommerce\\PluginFramework\\v5_11_0\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' not found in wp-content/plugins/payarc-payment-gateway/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:39

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)
No browser issues were found

Optimizations

Plugin configuration 93% 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
4 plugin tags: woocommerce, ecommerce, payarc, e-commerce

payarc-payment-gateway/woocommerce-gateway-payarc.php 85% from 13 tests

This is the main PHP file of "PAYARC Payment Gateway" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("payarc-payment-gateway.php" instead of "woocommerce-gateway-payarc.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.3" instead of "5.3.0")

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
Everything looks great! No dangerous files found in this plugin18,244 lines of code in 168 files:
LanguageFilesBlank linesComment linesLines of code
PHP1149,00317,54815,324
PO File14337661,097
CoffeeScript7490346699
JavaScript10123220512
Sass610326462
CSS7195107
Markdown28022
SVG210021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.84
▷ Minimum class complexity1.00
▷ Maximum class complexity270.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces14
Interfaces13
Traits2
Classes92
▷ Abstract classes2527.17%
▷ Concrete classes6772.83%
▷ Final classes00.00%
Methods1,526
▷ Static methods1016.62%
▷ Public methods1,06769.92%
▷ Protected methods43028.18%
▷ Private methods291.90%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants110
▷ Global constants10.91%
▷ Class constants10999.09%
▷ Public constants109100.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
22 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-amex.png1.14KB1.21KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-switch.png0.64KB0.68KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/sample-check.png6.29KB6.96KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-echeck.png1.09KB1.15KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-amazon.png0.71KB0.75KB0.00%