79% new-users-monitor

Code Review | New Users Monitor

WordPress plugin New Users Monitor scored79%from 54 tests.

About plugin

  • Plugin page: new-users-monitor
  • Plugin version: 2.14
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 17, 2018
  • Latest release: Jun 9, 2022
  • Number of updates: 19
  • Update frequency: every 73.4 days
  • Top authors: wpgear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.36ms] Passed 4 tests

Server-side resources used by New Users Monitor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.90 ▲1.78
Dashboard /wp-admin3.36 ▲0.0148.74 ▼11.98
Posts /wp-admin/edit.php3.41 ▲0.0546.83 ▼2.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.75 ▼12.71
Media Library /wp-admin/upload.php3.28 ▲0.0539.07 ▲4.60
New Users Monitor /wp-admin/users.php?page=new-users-monitor/options.php3.3631.79

Server storage [IO: ▲0.03MB] [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: 6 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
num_first_run
theysaidso_admin_options
num_scan_newusers
num_dashboard_newusers

Browser metrics Passed 4 tests

A check of browser resources used by New Users Monitor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12014.73 ▲0.381.78 ▲0.1040.67 ▼0.29
Dashboard /wp-admin2,290 ▲1135.66 ▲0.0882.94 ▼3.5643.20 ▼0.85
Posts /wp-admin/edit.php2,101 ▼22.01 ▲0.0235.57 ▼3.6133.41 ▼0.00
Add New Post /wp-admin/post-new.php1,531 ▲523.04 ▼0.01658.07 ▼63.1562.85 ▲0.85
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.0694.53 ▼12.0741.61 ▼5.45
New Users Monitor /wp-admin/users.php?page=new-users-monitor/options.php1,1102.0322.5426.81

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/new-users-monitor/uninstall.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/new-users-monitor/new-users-monitor.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/new-users-monitor/options.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
9 plugin tags: confirm, login, registration, user, security...

new-users-monitor/new-users-monitor.php Passed 13 tests

"New Users Monitor" version 2.14's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
Ext Security. Automatic scanning of the Users list, and detect unauthorized addition to the DB. Informs immediately Admin by email.

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
Everything looks great! No dangerous files found in this plugin499 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP411966461
CSS11438

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions15
▷ Named functions15100.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