99% authorizenet-woocommerce-lightweight-addon

Code Review | Authorize.Net/eProcessing Network Payment Gateway for WooCommerce

WordPress plugin Authorize.Net/eProcessing Network Payment Gateway for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: authorizenet-wooc...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 8, 2015
  • Latest release: Oct 8, 2016
  • Number of updates: 42
  • Update frequency: every 12.4 days
  • Top authors: nazrulhassanmca (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 4,204 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼290.15ms] Passed 4 tests

An overview of server-side resources used by Authorize.Net/eProcessing Network Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0855.72 ▲6.04
Dashboard /wp-admin3.49 ▲0.0833.53 ▲1.77
Posts /wp-admin/edit.php3.72 ▲0.0838.03 ▲1.71
Add New Post /wp-admin/post-new.php6.97 ▼0.0198.66 ▼1,159.47
Media Library /wp-admin/upload.php3.37 ▲0.0727.63 ▼4.61

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Authorize.Net/eProcessing Network Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2915.79 ▼0.177.84 ▲0.082.51 ▼0.06
Dashboard /wp-admin2,895 ▲346.12 ▼0.04121.66 ▼13.26155.63 ▼5.14
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0064.85 ▼7.66141.45 ▲2.11
Add New Post /wp-admin/post-new.php1,711 ▼4920.87 ▼1.69440.02 ▲12.91155.41 ▼6.55
Media Library /wp-admin/upload.php1,698 ▼05.53 ▼0.00146.82 ▼5.54187.58 ▼4.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tested up to: Version not formatted correctly
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

authorizenet-woocommerce-lightweight-addon/authorize.net-woocommerce-lightweight-addon.php 92% from 13 tests

The main PHP script in "Authorize.Net/eProcessing Network Payment Gateway for WooCommerce" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("authorizenet-woocommerce-lightweight-addon.php" instead of "authorize.net-woocommerce-lightweight-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected364 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
9 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/visaelectron.png8.44KB3.69KB▼ 56.33%
images/dinersclub.png6.35KB3.25KB▼ 48.74%
images/maestro.png9.75KB3.88KB▼ 60.26%
images/visa.png6.19KB3.09KB▼ 50.13%
images/discover.png5.78KB3.07KB▼ 46.82%