10% userlog

Code Review | userlog

WordPress plugin userlog scored10%from 54 tests.

About plugin

  • Plugin page: userlog
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2013
  • Latest release: Oct 7, 2013
  • Number of updates: 10
  • Update frequency: every 10.3 days
  • Top authors: williewonka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,504 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Error in wp-content/plugins/userlog/userlog.php+294
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/userlog/userlog.php:294
    Stack trace:
    #0 wp-content/plugins/userlog/userlog.php(384): userlog_downloadgeodatabase()
    #1 wp-includes/class-wp-hook.php(310): userlog_init()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

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

An overview of server-side resources used by userlog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.50 ▼5.61
Dashboard /wp-admin3.31 ▲0.0049.73 ▼2.27
Posts /wp-admin/edit.php3.36 ▲0.0047.51 ▲1.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.25 ▲3.27
Media Library /wp-admin/upload.php3.23 ▲0.0035.50 ▲1.83

Server storage [IO: ▲0.09MB] [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: 4 new files
Database: 1 new table, 9 new options
New tables
wp_userlog
New WordPress options
userlog_timezone
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
userlog_databaselastupdate
can_compress_scripts
theysaidso_admin_options
db_upgraded
userlog_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for userlog
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.291.78 ▼0.2941.86 ▼5.20
Dashboard /wp-admin2,197 ▲125.83 ▼0.1998.37 ▼17.1138.82 ▼7.08
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0040.13 ▲5.3337.81 ▲2.54
Add New Post /wp-admin/post-new.php1,541 ▲723.26 ▲0.11646.71 ▼55.9550.48 ▼14.10
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.0896.11 ▼2.7441.89 ▼1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/userlog/userlog.php:13

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === userlog === )
  • Screenshots: Please add an image for screenshot #1 (Example of displaying the logs on the dashboard, with the new search bar under it.)
Please take inspiration from this readme.txt

userlog/userlog.php Passed 13 tests

"userlog" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
Keeps a log of users who logged in from where and when

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 plugin975 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28947975

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.15KB19.39KB▼ 61.32%