78% woo-authorize-net-gateway-aim

Code Review | Authorize.Net Payment Gateway For WooCommerce

WordPress plugin Authorize.Net Payment Gateway For WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woo-authorize-net...
  • Plugin version: 6.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Jul 1, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 106
  • Update frequency: every 22.1 days
  • Top authors: mohsinoffline (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

10,000+ active /189,911 total downloads


Plugin footprint 65% from 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: ▲5.11MB] [CPU: ▲28.63ms] 75% from 4 tests

Analyzing server-side resources used by Authorize.Net Payment Gateway For WooCommerce
Please fix the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.11MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.01 ▲5.5561.05 ▲19.77
Dashboard /wp-admin9.03 ▲5.7384.40 ▲35.29
Posts /wp-admin/edit.php9.03 ▲5.6881.75 ▲33.75
Add New Post /wp-admin/post-new.php9.38 ▲3.49122.76 ▲29.04
Media Library /wp-admin/upload.php9.03 ▲5.8064.84 ▲31.97
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.0362.01

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 260 new files
Database: no new tables, 10 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Authorize.Net Payment Gateway For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2414.37 ▼0.241.53 ▼0.4229.74 ▼15.42
Dashboard /wp-admin2,213 ▲335.58 ▼0.0497.86 ▼1.2850.00 ▲5.84
Posts /wp-admin/edit.php2,121 ▲212.10 ▲0.0740.69 ▼2.8638.85 ▲4.94
Add New Post /wp-admin/post-new.php1,534 ▲822.64 ▼0.24603.45 ▲9.5749.95 ▼0.69
Media Library /wp-admin/upload.php1,418 ▲184.21 ▲0.0199.59 ▲2.4546.87 ▲3.53
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0721.6528.9431.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/woo-authorize-net-gateway-aim/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • wc_authnet_version
    • widget_theysaidso_widget
    • fs_active_plugins
    • fs_debug_mode
    • widget_recent-posts
    • fs_accounts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
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
Everything seems fine, but this is not an exhaustive test


Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: payment gateway, woocommerce payment gateway, recurring payments, woocommerce, authorizenet...

woo-authorize-net-gateway-aim/gateway.php 69% from 13 tests

The primary PHP file in "Authorize.Net Payment Gateway For WooCommerce" version 6.0.7 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 208 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "3.3")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-authorize-net-gateway-aim.php" instead of "gateway.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

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected59,708 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PO File149,44410,35220,581

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity81.22
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
▷ Static methods22216.31%
▷ Public methods95470.10%
▷ Protected methods231.69%
▷ Private methods38428.21%
▷ Named functions10299.03%
▷ Anonymous functions10.97%
▷ Global constants10466.24%
▷ Class constants5333.76%
▷ Public constants53100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/woo-authorize-net-gateway-aim.png18.91KB6.96KB▼ 63.21%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%