89% authorizenet-woocommerce-lightweight-addon

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

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

About plugin

  • Plugin page: authorizenet-wooc...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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

200+ active /4,561 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.73ms] Passed 4 tests

This is a short check of server-side resources used by Authorize.Net/eProcessing Network Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.16 ▼5.54
Dashboard /wp-admin3.38 ▲0.0845.67 ▼8.46
Posts /wp-admin/edit.php3.43 ▲0.0848.35 ▲3.49
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.48 ▼5.32
Media Library /wp-admin/upload.php3.30 ▲0.0834.51 ▲0.42

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Authorize.Net/eProcessing Network Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.111.86 ▼0.2340.74 ▼4.30
Dashboard /wp-admin2,206 ▲184.88 ▼1.02100.17 ▼9.3939.25 ▼5.51
Posts /wp-admin/edit.php2,092 ▲32.05 ▼0.0140.73 ▲4.9235.62 ▼0.70
Add New Post /wp-admin/post-new.php1,533 ▼923.18 ▲4.86689.82 ▲55.0659.62 ▼5.71
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.04108.58 ▲10.4247.13 ▲4.05

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tested up to: Invalid version format
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

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

The main file in "Authorize.Net/eProcessing Network Payment Gateway for WooCommerce" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to 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 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin364 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16222364

PHP code Passed 2 tests

This is a short overview 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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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/authorizenet_lightweight.png8.53KB3.53KB▼ 58.61%
images/dinersclub.png6.35KB3.25KB▼ 48.74%
images/mastercard.png9.79KB3.72KB▼ 62.00%
images/visaelectron.png8.44KB3.69KB▼ 56.33%
images/amex.png14.27KB5.79KB▼ 59.41%