83% order-audit-log-for-woocommerce

Code Review | Order Audit Log for WooCommerce

WordPress plugin Order Audit Log for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: order-audit-log-f...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.x-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2017
  • Latest release: Feb 20, 2023
  • Number of updates: 23
  • Update frequency: every 92.5 days
  • Top authors: infosoftplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,096 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Order Audit Log for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.68 ▲0.13
Dashboard /wp-admin3.31 ▲0.0056.28 ▲5.24
Posts /wp-admin/edit.php3.36 ▲0.0052.32 ▼6.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.18 ▼6.46
Media Library /wp-admin/upload.php3.23 ▲0.0038.43 ▼2.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Order Audit Log for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.33 ▼0.331.96 ▲0.3644.89 ▼0.03
Dashboard /wp-admin2,195 ▲315.59 ▲0.0186.41 ▼21.4140.03 ▼2.94
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0338.49 ▼3.6534.57 ▼5.91
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▲0.03669.78 ▼28.0050.62 ▼12.82
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.0095.29 ▼23.2845.99 ▼5.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/order-audit-log-for-woocommerce/ic-woocommerce-audit-log-lite.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ic_commerce_audit_log_lite_function' not found in wp-content/plugins/order-audit-log-for-woocommerce/include/ic_commerce_audit_log_lite_class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Order Audit Log Report), #2 (Audit Log Setting)
You can take inspiration from this readme.txt

order-audit-log-for-woocommerce/ic-woocommerce-audit-log-lite.php 69% from 13 tests

The primary PHP file in "Order Audit Log for WooCommerce" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "3.5.x")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("order-audit-log-for-woocommerce.php" instead of "ic-woocommerce-audit-log-lite.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

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
Good job! No executable or dangerous file extensions detected5,795 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP77401742,721
CSS55761691,990
SVG100640
JavaScript214285444

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity75.86
▷ Minimum class complexity7.00
▷ Maximum class complexity180.00
Average method complexity5.85
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods108
▷ Static methods32.78%
▷ Public methods108100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
21 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/product-icon.png1.67KB1.28KB▼ 23.20%
images/icons/sales-icon.png0.83KB0.96KB0.00%
images/csv-icon.png0.64KB0.73KB0.00%
images/close_button.png1.50KB1.39KB▼ 7.56%
images/icons/customers-icon.png0.81KB0.83KB0.00%