80% wp-user-activity

Code Review | WP User Activity

WordPress plugin WP User Activity scored80%from 54 tests.

About plugin

  • Plugin page: wp-user-activity
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Mar 29, 2021
  • Number of updates: 20
  • Update frequency: every 100.8 days
  • Top authors: johnjamesjacoby (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /11,396 total downloads

Benchmarks

Plugin footprint 65% 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.72MB] [CPU: ▼5.71ms] Passed 4 tests

A check of server-side resources used by WP User Activity
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7246.98 ▲10.54
Dashboard /wp-admin4.04 ▲0.6952.36 ▼7.47
Posts /wp-admin/edit.php4.09 ▲0.7348.94 ▲1.49
Add New Post /wp-admin/post-new.php6.62 ▲0.7384.56 ▼23.49
Media Library /wp-admin/upload.php3.96 ▲0.7342.34 ▲6.63

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP User Activity
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5714.35 ▼0.031.81 ▲0.1849.51 ▲9.75
Dashboard /wp-admin2,206 ▲265.59 ▼0.0691.91 ▲8.0743.27 ▲0.69
Posts /wp-admin/edit.php2,114 ▲142.00 ▼0.0135.32 ▼0.5232.89 ▲1.06
Add New Post /wp-admin/post-new.php1,552 ▲2623.00 ▼0.57654.42 ▼4.2853.01 ▼1.01
Media Library /wp-admin/upload.php1,417 ▲174.19 ▲0.0595.17 ▲0.7043.26 ▲2.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-user-activity/wp-user-activity/includes/common.php+469
    Trying to access array offset on value of type null
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: users, log, activity

wp-user-activity/wp-user-activity.php 92% from 13 tests

The main PHP script in "WP User Activity" version 2.2.0 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/assets/lang/" does not exist

Code Analysis Passed 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 plugin2,629 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP238112,3002,596
CSS14033

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.32
Average class complexity8.27
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods125
▷ Static methods00.00%
▷ Public methods10987.20%
▷ Protected methods1612.80%
▷ Private methods00.00%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected