82% 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 scored 82% from 54 tests.

About plugin

  • Plugin page: accept-authorize-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.9.2
  • First release: Nov 11, 2020
  • Latest release: Apr 23, 2021
  • Number of updates: 10
  • Update frequency: every 16.3 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 1,242 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼301.38ms] Passed 4 tests

An overview of server-side resources used by Accept Authorize.NET Payments Using Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0152.24 ▲2.35
Dashboard /wp-admin3.41 ▲0.0032.27 ▼2.00
Posts /wp-admin/edit.php3.65 ▲0.0135.05 ▼2.17
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.18 ▼1,199.57
Media Library /wp-admin/upload.php3.30 ▲0.0022.89 ▼1.76
Authorize.Net Add-on /wp-admin/edit.php?post_type=cf7adn_data3.1819.39
Import Authorize.net Data /wp-admin/admin.php?page=cfadn-import3.1018.41

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 523 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accept Authorize.NET Payments Using Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1916.26 ▲0.565.98 ▼0.352.12 ▼0.71
Dashboard /wp-admin2,892 ▲316.17 ▲0.08115.01 ▼22.42159.33 ▼1.83
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0165.61 ▼0.92144.27 ▼2.66
Add New Post /wp-admin/post-new.php1,690 ▲3019.36 ▲2.56407.91 ▼33.01158.14 ▼10.73
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.01139.35 ▲3.14188.50 ▲3.87
Authorize.Net Add-on /wp-admin/edit.php?post_type=cf7adn_data280.940.0417.21
Import Authorize.net Data /wp-admin/admin.php?page=cfadn-import280.940.0419.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/accept-authorize-net-payments-using-contact-form-7/inc/front/template/cf7adn-info.php
  • 162× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > 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/ARBGetSubscriptionListController.php:7
    • > 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/DecryptPaymentDataController.php:7
    • > 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/SecurePaymentContainerResponse.php:8
    • > 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/GetCustomerProfileRequest.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/MobileDeviceLoginController.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/CreateCustomerProfileRequest.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/GetCustomerPaymentProfileResponse.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/UpdateSplitTenderGroupController.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/CreateCustomerProfileFromTransactionRequest.php:8
    • > 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/GetMerchantDetailsRequest.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > 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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 39 tag instead of maximum 10
The official readme.txt is a good inspiration

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

This is the main PHP file of "Accept Authorize.NET Payments Using Contact Form 7" version 1.2, 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("accept-authorize-net-payments-using-contact-form-7.php" instead of "accept-authorize.net-payments-using-contact-form-7.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin40,921 lines of code in 518 files:
LanguageFilesBlank linesComment linesLines of code
PHP2885,00614,50326,606
YAML216008,563
JavaScript61,3373625,181
CSS6710522
JSON21049

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.90
▷ Minimum class complexity1.00
▷ Maximum class complexity170.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces16
Interfaces1
Traits0
Classes281
▷ Abstract classes10.36%
▷ Concrete classes28099.64%
▷ Final classes00.00%
Methods2,248
▷ Static methods70.31%
▷ Public methods2,18597.20%
▷ Protected methods502.22%
▷ Private methods130.58%
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

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