10% user-logs

Code Review | User Logs

WordPress plugin User Logs scored 10% from 54 tests.

About plugin

  • Plugin page: user-logs
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Aug 10, 2022
  • Latest release: Aug 10, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: vikas4travel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 236 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 validation failed for this plugin
    • > 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.)

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.97ms] Passed 4 tests

Analyzing server-side resources used by User Logs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.06 ▼3.02
Dashboard /wp-admin3.41 ▲0.1145.76 ▼3.32
Posts /wp-admin/edit.php3.53 ▲0.1745.98 ▲0.48
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.16 ▼2.00
Media Library /wp-admin/upload.php3.33 ▲0.1133.51 ▲0.94
Settings /wp-admin/admin.php?page=userlogs_settings3.3142.65
User Logs /wp-admin/admin.php?page=userlogs3.3635.20

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: 1 new table, 8 new options
New tables
wp_user_logs
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
userlogs_cron_cycle
userlogs_welcome

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Logs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.30 ▼0.931.83 ▲0.0243.74 ▼0.33
Dashboard /wp-admin2,233 ▲454.82 ▼1.0497.72 ▼22.5139.73 ▼7.28
Posts /wp-admin/edit.php2,116 ▲271.98 ▼0.0434.04 ▼1.6132.10 ▼1.00
Add New Post /wp-admin/post-new.php1,569 ▲5518.34 ▲0.75616.63 ▼50.8360.58 ▲7.04
Media Library /wp-admin/upload.php1,409 ▲244.24 ▼0.0194.05 ▼2.6342.08 ▼2.07
Settings /wp-admin/admin.php?page=userlogs_settings8741.9632.2226.03
User Logs /wp-admin/admin.php?page=userlogs3,8936.85110.7657.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/user-logs/user-logs.php
    • > /wp-content/plugins/user-logs/classes/class-userlogs-main.php
    • > /wp-content/plugins/user-logs/classes/class-userlogs-common.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/user-logs/templates/about.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/user-logs/templates/logs.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/user-logs/templates/settings.php:14

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: user logs, activity logs, user activity, login logs, registration logs...

user-logs/user-logs.php 85% from 13 tests

"User Logs" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.9" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,283 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9237222996
JavaScript21819181
CSS212576
Markdown122030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity42.00
▷ Minimum class complexity3.00
▷ Maximum class complexity81.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods625.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin