83% authorizenet-payment-gateway-for-woocommerce

Code Review | Authorize.net Payment Gateway For WooCommerce

WordPress plugin Authorize.net Payment Gateway For WooCommercescored83%from 54 tests.

About plugin

  • Plugin page: authorizenet-paym...
  • Plugin version: 8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2013
  • Latest release: Oct 20, 2023
  • Number of updates: 124
  • Update frequency: every 30.2 days
  • Top authors: ishanverma (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

5,000+ active /271,457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.55ms] Passed 4 tests

Analyzing server-side resources used by Authorize.net Payment Gateway For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.30 ▼0.93
Dashboard /wp-admin3.40 ▲0.0944.82 ▼2.94
Posts /wp-admin/edit.php3.51 ▲0.1550.82 ▲7.10
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.05 ▼25.14
Media Library /wp-admin/upload.php3.32 ▲0.0934.55 ▲2.81

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking 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,843 ▲8214.19 ▼0.362.20 ▲0.3143.23 ▼0.41
Dashboard /wp-admin2,227 ▲535.59 ▼0.0287.74 ▼16.6454.67 ▲10.94
Posts /wp-admin/edit.php2,129 ▲291.97 ▼0.0137.05 ▼1.3133.98 ▼3.10
Add New Post /wp-admin/post-new.php1,559 ▲3123.08 ▼0.04665.16 ▲13.92159.42 ▲108.69
Media Library /wp-admin/upload.php1,432 ▲324.13 ▼0.2894.76 ▲0.2176.57 ▲36.53

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/authorizenet-payment-gateway-for-woocommerce/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === Authorize.net Payment Gateway For WooCommerce=== )
You can look at the official readme.txt

authorizenet-payment-gateway-for-woocommerce/index.php 85% from 13 tests

This is the main PHP file of "Authorize.net Payment Gateway For WooCommerce" version 8.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0.0" instead of "3.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("authorizenet-payment-gateway-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin475 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP210443474
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity11.50
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected