62% user-activity-log

Code Review | User Activity Log

WordPress plugin User Activity Log scored62%from 54 tests.

About plugin

  • Plugin page: user-activity-log
  • Plugin version: 1.6.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Nov 24, 2023
  • Number of updates: 59
  • Update frequency: every 51.9 days
  • Top authors: solwininfotech (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

10,000+ active /296,580 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.70MB] [CPU: ▲8.11ms] 75% from 4 tests

This is a short check of server-side resources used by User Activity Log
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,064.25ms on /wp-admin/admin.php?page=general_settings_menu)
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7050.07 ▲9.49
Dashboard /wp-admin4.01 ▲0.661,332.10 ▲1,268.13
Posts /wp-admin/edit.php4.12 ▲0.7756.96 ▲7.91
Add New Post /wp-admin/post-new.php6.61 ▲0.72100.78 ▲4.98
Media Library /wp-admin/upload.php3.93 ▲0.7046.27 ▲10.06
Settings /wp-admin/admin.php?page=general_settings_menu4.511,064.25

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 28 new files
Database: 1 new table, 12 new options
New tables
wp_ualp_user_activity
New WordPress options
can_compress_scripts
enable_email
to_email
from_email
email_message
db_upgraded
widget_recent-comments
theysaidso_admin_options
ual_version
ual_promo_time
...

Browser metrics Passed 4 tests

A check of browser resources used by User Activity Log
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,086 ▲32414.93 ▲0.715.08 ▲3.2743.98 ▼0.27
Dashboard /wp-admin2,488 ▲3136.65 ▲1.02141.27 ▲39.0683.42 ▲40.52
Posts /wp-admin/edit.php2,242 ▲1392.80 ▲0.7945.48 ▲3.2438.17 ▲1.53
Add New Post /wp-admin/post-new.php1,818 ▲28223.42 ▲0.43605.56 ▼26.6435.31 ▼15.17
Media Library /wp-admin/upload.php1,531 ▲1375.13 ▲0.97108.77 ▲11.2181.71 ▲40.87
Settings /wp-admin/admin.php?page=general_settings_menu2,4889.60405.5081.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ualp_user_activity
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • ual_is_optin
    • widget_recent-posts
    • theysaidso_admin_options
    • to_email
    • db_upgraded
    • widget_theysaidso_widget
    • from_email
    • ual_version
    • email_message
    • enable_email
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=general_settings_menu
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-activity-log/includes/ual-user-switching.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-activity-log/promo-notice.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/user-activity-log/includes/ual-redirection.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=general_settings_menu
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=general_settings_menu
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=general_settings_menu
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can look at the official readme.txt

user-activity-log/user_activity_log.php 92% from 13 tests

The primary PHP file in "User Activity Log" version 1.6.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("user-activity-log.php" instead of "user_activity_log.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
There were no executable files found in this plugin17,747 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,1722,13810,715
PHP175081,1986,021
CSS21771,011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions191
▷ Named functions18998.95%
▷ Anonymous functions21.05%
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
5 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/star.png1.15KB0.40KB▼ 64.97%
images/logo.png1.74KB1.21KB▼ 30.91%
images/logo-200.png9.29KB4.37KB▼ 52.99%
images/ual_advertisement_popup.png97.33KB63.99KB▼ 34.25%
images/support-ticket.png3.78KB2.00KB▼ 47.16%