10% arca-payment-gateway

Code Review | ArCa Payment Gateway

WordPress plugin ArCa Payment Gateway scored10%from 54 tests.

About plugin

  • Plugin page: arca-payment-gateway
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2021
  • Latest release: Aug 22, 2023
  • Number of updates: 70
  • Update frequency: every 12.9 days
  • Top authors: planetstudio (57.14%)webconstructio (44.29%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,434 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/arca-payment-gateway/arca-payment-gateway.php+117
    Trying to get property 'idramEnabled' of non-object

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.29ms] Passed 4 tests

Server-side resources used by ArCa Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.95 ▲0.75
Dashboard /wp-admin3.35 ▲0.0047.42 ▼9.53
Posts /wp-admin/edit.php3.40 ▲0.0450.07 ▼0.79
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.41 ▼11.60
Media Library /wp-admin/upload.php3.27 ▲0.0435.71 ▲2.25
Error logs /wp-admin/admin.php?page=errorlogs3.2932.91
How To Use /wp-admin/admin.php?page=how_to_use3.3632.92
Price list /wp-admin/admin.php?page=pricelist3.3231.62
Dashboard /wp-admin/admin.php?page=dashboard3.3835.79
Checkout form /wp-admin/admin.php?page=checkoutform3.3233.09
Idram Settings /wp-admin/admin.php?page=idramconfig3.3232.53
vPOS Settings /wp-admin/admin.php?page=config3.3835.41
Support /wp-admin/admin.php?page=support3.2630.86
Currency /wp-admin/admin.php?page=currency3.2833.22

Server storage [IO: ▲0.71MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: 9 new tables, 7 new options
New tables
wp_arca_pg_idram_language
wp_arca_pg_currency
wp_arca_pg_banks
wp_arca_pg_pricelist
wp_arca_pg_language
wp_arca_pg_errorlogs
wp_arca_pg_orders
wp_arca_pg_idram_config
wp_arca_pg_config
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
apg_db_version
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by ArCa Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,108 ▲36213.68 ▼0.701.85 ▲0.2333.89 ▼7.75
Dashboard /wp-admin2,490 ▲2995.05 ▼0.8599.23 ▼3.9286.00 ▲44.48
Posts /wp-admin/edit.php2,294 ▲2052.13 ▲0.1340.61 ▼0.7136.16 ▲0.54
Add New Post /wp-admin/post-new.php1,861 ▲33324.96 ▲1.66661.58 ▲64.8271.33 ▲16.13
Media Library /wp-admin/upload.php1,590 ▲2054.33 ▲0.12100.06 ▼9.3773.79 ▲27.64
Error logs /wp-admin/admin.php?page=errorlogs1,0051.7427.0637.88
How To Use /wp-admin/admin.php?page=how_to_use1,8131.7926.5547.82
Price list /wp-admin/admin.php?page=pricelist1,0501.7727.2427.40
Dashboard /wp-admin/admin.php?page=dashboard1,0761.8027.0931.61
Checkout form /wp-admin/admin.php?page=checkoutform1,3781.8029.2138.78
Orders /wp-admin/admin.php?page=оrderlog1,0491.7625.3327.42
Idram Settings /wp-admin/admin.php?page=idramconfig1,1531.7727.7239.85
vPOS Settings /wp-admin/admin.php?page=config1,1781.7928.4130.85
Support /wp-admin/admin.php?page=support9801.7327.0427.00
Currency /wp-admin/admin.php?page=currency1,1181.7727.7028.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables detected upon uninstall: 9 tables
    • wp_arca_pg_orders
    • wp_arca_pg_idram_config
    • wp_arca_pg_banks
    • wp_arca_pg_idram_language
    • wp_arca_pg_language
    • wp_arca_pg_errorlogs
    • wp_arca_pg_pricelist
    • wp_arca_pg_config
    • wp_arca_pg_currency
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • apg_db_version
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/arca-payment-gateway/arca-payment-gateway.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arca-payment-gateway/includes/apg-register-scripts-styles.php:2
    • > PHP Notice
      Trying to get property 'rest_serverID' of non-object in wp-content/plugins/arca-payment-gateway/includes/apg-error-logs.php on line 8
    • > PHP Warning
      Use of undefined constant ARCAPG_PRO - assumed 'ARCAPG_PRO' (this will throw an Error in a future version of PHP) in wp-content/plugins/arca-payment-gateway/includes/apg-dashboard.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/arca-payment-gateway/includes/apg-widget.php:56
    • > PHP Notice
      Trying to get property 'idramKey' of non-object in wp-content/plugins/arca-payment-gateway/endpoints/apg-idram.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arca-payment-gateway/forms/form-default.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/arca-payment-gateway/buttons/button-custom-amount.php:3
    • > PHP Notice
      Undefined variable: arca_config in wp-content/plugins/arca-payment-gateway/endpoints/apg-ameria-bank.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/arca-payment-gateway/includes/apg-wc-gateways_icons.php:2
    • > PHP Notice
      Trying to get property 'rest_serverID' of non-object in wp-content/plugins/arca-payment-gateway/endpoints/apg-ameria-bank.php on line 5

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

arca-payment-gateway/arca-payment-gateway.php 92% from 13 tests

The principal PHP file in "ArCa Payment Gateway" v. 1.3.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,878 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP371,0505783,613
PO File2398262830
CSS28830337
JavaScript141698

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity5.25
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions56
▷ Named functions5496.43%
▷ Anonymous functions23.57%
Constants11
▷ Global constants11100.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
17 PNG files occupy 0.41MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/idram-rocket-2.png82.18KB36.04KB▼ 56.14%
images/bank-logos/1.png2.45KB1.14KB▼ 53.51%
images/bank-logos/10.png10.92KB3.84KB▼ 64.81%
images/credit-card.png36.61KB16.64KB▼ 54.55%
images/idram.png17.70KB2.63KB▼ 85.13%