10% acquired-payments-gateway-for-woocommerce

Code Review | Acquired Payments Gateway for WooCommerce

WordPress plugin Acquired Payments Gateway for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: acquired-payments...
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 17, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 258
  • Update frequency: every 2.7 days
  • Top authors: acquired2021 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,592 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/acquired-payments-gateway-for-woocommerce/acquired-payment.php+63
    include_once(wp-content/plugins/woocommerce/includes/admin/wc-admin-functions.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.38ms] Passed 4 tests

Analyzing server-side resources used by Acquired Payments Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.04 ▼7.17
Dashboard /wp-admin3.31 ▼0.0450.64 ▼6.98
Posts /wp-admin/edit.php3.36 ▲0.0048.92 ▼0.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.08 ▼10.76
Media Library /wp-admin/upload.php3.24 ▲0.0035.22 ▲0.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Acquired Payments Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4314.27 ▼0.011.92 ▼0.1136.83 ▼5.65
Dashboard /wp-admin2,195 ▲145.53 ▼0.1999.55 ▼12.3243.27 ▲4.92
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0240.68 ▲1.9135.05 ▼2.11
Add New Post /wp-admin/post-new.php1,526 ▼323.04 ▼0.62657.49 ▲67.7252.60 ▲5.70
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0094.66 ▲0.8641.07 ▲0.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Payments configuration) image missing
Please take inspiration from this readme.txt

acquired-payments-gateway-for-woocommerce/acquired-payment.php 77% from 13 tests

The main PHP file in "Acquired Payments Gateway for WooCommerce" ver. 1.2.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acquired-payments-gateway-for-woocommerce.php" instead of "acquired-payment.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
No dangerous file extensions were detected7,856 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP157421,8505,780
JavaScript73075241,878
SVG571104
CSS211094

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity79.11
▷ Minimum class complexity27.00
▷ Maximum class complexity176.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods163
▷ Static methods00.00%
▷ Public methods16098.16%
▷ Protected methods31.84%
▷ Private methods00.00%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin