72% accept-authorize-net-payments-using-contact-form-7

Code Review | Accept Authorize.NET Payments Using Contact Form 7

WordPress plugin Accept Authorize.NET Payments Using Contact Form 7 scored72%from 54 tests.

About plugin

  • Plugin page: accept-authorize-...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Aug 17, 2023
  • Number of updates: 19
  • Update frequency: every 53.1 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,773 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Server-side resources used by Accept Authorize.NET Payments Using Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.45 ▲1.60
Dashboard /wp-admin3.31 ▼0.0443.19 ▼15.93
Posts /wp-admin/edit.php3.36 ▲0.0046.36 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.12 ▼17.31
Media Library /wp-admin/upload.php3.23 ▲0.0033.15 ▲2.18
Authorize.Net Add-on /wp-admin/edit.php?post_type=cf7adn_data3.0426.12
Import Authorize.net Data /wp-admin/admin.php?page=cfadn-import3.0027.84

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 523 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Accept Authorize.NET Payments Using Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.431.79 ▼0.2039.22 ▼0.66
Dashboard /wp-admin2,203 ▲145.80 ▼0.0598.78 ▼9.3938.22 ▼1.74
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0338.84 ▼2.2035.91 ▼2.69
Add New Post /wp-admin/post-new.php1,533 ▲1423.37 ▲0.15679.76 ▲22.1163.52 ▲11.93
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0496.11 ▲1.2441.38 ▼4.27
Authorize.Net Add-on /wp-admin/edit.php?post_type=cf7adn_data280.440.063.58
Import Authorize.net Data /wp-admin/admin.php?page=cfadn-import280.440.085.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/front/template/cf7adn-info.php
  • 162× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiRequestType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/GetCustomerPaymentProfileListRequest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiResponseType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/CreateCustomerProfileResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\controller\\base\\ApiOperationBase' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/controller/GetCustomerProfileController.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiRequestType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/CreateCustomerProfileTransactionRequest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\CustomerProfileExType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/SubscriptionCustomerProfileType.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiRequestType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/GetHostedProfilePageRequest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiResponseType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/DeleteCustomerShippingAddressResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiResponseType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/DeleteCustomerPaymentProfileResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\CreditCardSimpleType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/CreditCardType.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiRequestType' not found in wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/lib/net/authorize/api/contract/v1/GetSettledBatchListRequest.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=cf7adn_data
    • > Network (severe)
    wp-admin/edit.php?post_type=cf7adn_data - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=cfadn-import
    • > Network (severe)
    wp-admin/admin.php?page=cfadn-import - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: There are too many tags (39 tag instead of maximum 10)
You can look at the official readme.txt

accept-authorize-net-payments-using-contact-form-7/accept-authorize.net-payments-using-contact-form-7.php 85% from 13 tests

The entry point to "Accept Authorize.NET Payments Using Contact Form 7" version 1.9 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("accept-authorize-net-payments-using-contact-form-7.php" instead of "accept-authorize.net-payments-using-contact-form-7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected40,276 lines of code in 518 files:
LanguageFilesBlank linesComment linesLines of code
PHP2885,06114,75225,947
YAML216008,728
JavaScript61,3053535,030
CSS6710522
JSON21049

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity14.32
▷ Minimum class complexity1.00
▷ Maximum class complexity173.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces16
Interfaces1
Traits0
Classes281
▷ Abstract classes10.36%
▷ Concrete classes28099.64%
▷ Final classes00.00%
Methods2,283
▷ Static methods70.31%
▷ Public methods2,22097.24%
▷ Protected methods502.19%
▷ Private methods130.57%
Functions175
▷ Named functions21.14%
▷ Anonymous functions17398.86%
Constants27
▷ Global constants2281.48%
▷ Class constants518.52%
▷ Public constants5100.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
There are no PNG files in this plugin