83% wp-activity-log-for-woocommerce

Code Review | WP Activity Log for WooCommerce

WordPress plugin WP Activity Log for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: wp-activity-log-f...
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 51
  • Update frequency: every 22.6 days
  • Top authors: WPWhiteSecurity (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10,000+ active / 151,273 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.15MB] [CPU: ▼2.65ms] Passed 4 tests

Server-side resources used by WP Activity Log for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.11 ▼3.34
Dashboard /wp-admin3.45 ▲0.1548.37 ▼3.29
Posts /wp-admin/edit.php3.56 ▲0.2150.54 ▼2.53
Add New Post /wp-admin/post-new.php6.05 ▲0.1797.88 ▼1.43
Media Library /wp-admin/upload.php3.37 ▲0.1538.11 ▲3.13

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP Activity Log for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8713.32 ▼0.984.34 ▲2.3739.80 ▼16.92
Dashboard /wp-admin2,228 ▲434.88 ▼1.02109.30 ▲6.2941.02 ▼4.43
Posts /wp-admin/edit.php2,111 ▲222.06 ▲0.0442.72 ▲2.2539.57 ▲3.71
Add New Post /wp-admin/post-new.php1,554 ▲1218.25 ▼0.02646.91 ▲42.7554.90 ▼5.33
Media Library /wp-admin/upload.php1,410 ▲224.24 ▲0.0497.57 ▲0.9941.71 ▼3.58

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-activity-log-for-woocommerce/wsal-woocommerce.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-activity-log-for-woocommerce/includes/wsal-functions.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-activity-log-for-woocommerce/wp-security-audit-log/custom-alerts.php:10

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 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Changes in WooCommerce, products and more reported in the WordPress activity log.) image missing
The official readme.txt might help

wp-activity-log-for-woocommerce/wsal-woocommerce.php 77% from 13 tests

The main PHP script in "WP Activity Log for WooCommerce" version 1.5.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-activity-log-for-woocommerce.php" instead of "wsal-woocommerce.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin13,003 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,2893,20112,931
JavaScript13272

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 186)
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity298.29
▷ Minimum class complexity1.00
▷ Maximum class complexity968.00
Average method complexity9.28
▷ Minimum method complexity1.00
▷ Maximum method complexity186.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods252
▷ Static methods12047.62%
▷ Public methods13453.17%
▷ Protected methods2610.32%
▷ Private methods9236.51%
Functions18
▷ Named functions1477.78%
▷ Anonymous functions422.22%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin