84% os-woocommerce-authorizenet-aim

Code Review | Authorize.net for WooCommerce

WordPress plugin Authorize.net for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: os-woocommerce-au...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Nov 24, 2015
  • Latest release: Apr 24, 2017
  • Number of updates: 6
  • Update frequency: every 86.2 days
  • Top authors: offshorent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.78ms] Passed 4 tests

An overview of server-side resources used by Authorize.net for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.51 ▼0.97
Dashboard /wp-admin3.38 ▲0.0747.89 ▼3.21
Posts /wp-admin/edit.php3.49 ▲0.1355.07 ▲3.02
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.58 ▼12.17
Media Library /wp-admin/upload.php3.30 ▲0.0735.87 ▼2.75

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

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

Browser metrics Passed 4 tests

Authorize.net for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.171.62 ▼0.3543.94 ▲2.37
Dashboard /wp-admin2,209 ▲185.90 ▲0.99107.67 ▲1.3640.11 ▼0.22
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0540.35 ▲5.1235.81 ▲1.03
Add New Post /wp-admin/post-new.php1,520 ▼823.40 ▲4.90626.80 ▼39.0450.75 ▼3.72
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0595.81 ▼12.3142.94 ▲1.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/os-woocommerce-authorizenet-aim/os-woocommerce-authorizenet-aim.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (First Data admin settings 1.), #2 (First Data admin settings 2.), #3 (Screenshot from checkout page)
The official readme.txt might help

os-woocommerce-authorizenet-aim/os-woocommerce-authorizenet-aim.php 92% from 13 tests

"Authorize.net for WooCommerce" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin282 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19659282

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.94KB13.56KB▼ 61.20%
screenshot-2.png34.95KB11.25KB▼ 67.81%