84% prevent-user-name-and-email-leakage

Code Review | Prevent user name and email leakage

WordPress plugin Prevent user name and email leakage scored84%from 54 tests.

About plugin

  • Plugin page: prevent-user-name...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.5
  • WordPress version: 6.3.1
  • First release: Dec 25, 2017
  • Latest release: Apr 22, 2018
  • Number of updates: 3
  • Update frequency: every 40.7 days
  • Top authors: mark-k (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.01ms] Passed 4 tests

An overview of server-side resources used by Prevent user name and email leakage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.71 ▼7.78
Dashboard /wp-admin3.31 ▲0.0149.08 ▼8.29
Posts /wp-admin/edit.php3.36 ▲0.0150.61 ▲1.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.14 ▼17.73
Media Library /wp-admin/upload.php3.23 ▲0.0137.54 ▲3.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Prevent user name and email leakage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.092.31 ▲0.6039.41 ▲0.48
Dashboard /wp-admin2,195 ▲215.62 ▲0.1083.56 ▼9.1539.05 ▼6.94
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0036.17 ▲0.1532.18 ▼7.45
Add New Post /wp-admin/post-new.php1,526 ▼023.45 ▲0.33678.95 ▲9.2749.91 ▼6.43
Media Library /wp-admin/upload.php1,400 ▼34.14 ▼0.0598.91 ▲3.4242.54 ▼3.30

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/prevent-user-name-and-email-leakage/integration/prevent-username-leakage/functions.php
    • > /wp-content/plugins/prevent-user-name-and-email-leakage/prevent-user-name-and-email-leakage.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: user-enumeration, calmpress, security, privacy

prevent-user-name-and-email-leakage/prevent-user-name-and-email-leakage.php 92% from 13 tests

The main file in "Prevent user name and email leakage" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected65 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2299965

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
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
Namespaces2
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin