83% hannan-woocommerce-authorizenet-aim-payment-gateway

Code Review | Hannan Authorize.net AIM - WooCommerce Gateway

WordPress plugin Hannan Authorize.net AIM - WooCommerce Gateway scored83%from 54 tests.

About plugin

  • Plugin page: hannan-woocommerc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2015
  • Latest release: Dec 1, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: abd hannan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,162 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.11ms] Passed 4 tests

This is a short check of server-side resources used by Hannan Authorize.net AIM - WooCommerce Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.24 ▼1.52
Dashboard /wp-admin3.31 ▲0.0145.02 ▲3.15
Posts /wp-admin/edit.php3.36 ▲0.0043.54 ▼3.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.28 ▼1.99
Media Library /wp-admin/upload.php3.23 ▲0.0031.16 ▼1.81

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Hannan Authorize.net AIM - WooCommerce Gateway: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.031.66 ▼0.1742.15 ▲2.36
Dashboard /wp-admin2,203 ▲145.79 ▲0.87100.23 ▼20.8540.53 ▼2.31
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0434.17 ▼5.9236.32 ▲1.83
Add New Post /wp-admin/post-new.php1,533 ▲1423.28 ▲0.01656.05 ▲27.9749.34 ▼6.64
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.03100.49 ▼1.3544.53 ▼1.67

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hannan-woocommerce-authorizenet-aim-payment-gateway/hannan-authorize.net-aim.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/hannan-woocommerce-authorizenet-aim-payment-gateway/hannan-authorize.net-aim-gateway.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === hannan-woocommerce-authorizenet-aim-payment-gateway === )
  • Screenshots: Screenshot #1 (assets/screenshot.png) image required
The official readme.txt might help

hannan-woocommerce-authorizenet-aim-payment-gateway/hannan-authorize.net-aim.php 92% from 13 tests

The entry point to "Hannan Authorize.net AIM - WooCommerce Gateway" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hannan-woocommerce-authorizenet-aim-payment-gateway.php" instead of "hannan-authorize.net-aim.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin163 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24566163

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot.PNG29.86KB11.20KB▼ 62.50%
assets/screenshot-1.PNG29.86KB11.20KB▼ 62.50%