83% log-user-stats

Code Review | Log Users Stats

WordPress plugin Log Users Stats scored83%from 54 tests.

About plugin

  • Plugin page: log-user-stats
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2013
  • Latest release: Nov 19, 2013
  • Number of updates: 22
  • Update frequency: every 0.1 days
  • Top authors: graphical_force (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,934 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼9.04ms] Passed 4 tests

A check of server-side resources used by Log Users Stats
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.50 ▼5.77
Dashboard /wp-admin3.33 ▼0.0248.50 ▼15.74
Posts /wp-admin/edit.php3.38 ▲0.0250.52 ▼2.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.34 ▼11.98
Media Library /wp-admin/upload.php3.25 ▲0.0241.45 ▲1.53

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Log Users Stats
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▲0.171.84 ▲0.0539.69 ▼3.78
Dashboard /wp-admin2,198 ▲245.61 ▼0.0991.60 ▲0.3841.71 ▼4.71
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0241.02 ▲3.3936.57 ▲2.47
Add New Post /wp-admin/post-new.php1,545 ▼023.09 ▼0.22663.75 ▼0.1055.50 ▲4.19
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0497.39 ▼6.1241.51 ▼5.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/log-user-stats/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === log-user-stats === )
Please take inspiration from this readme.txt

log-user-stats/index.php 85% from 13 tests

The main PHP script in "Log Users Stats" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("log-user-stats.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected101 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1159101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin