Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.19MB] [CPU: ▼5.84ms] Passed 4 tests
An overview of server-side resources used by Restrict Usernames
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.21 | 39.51 ▲1.04 |
Dashboard /wp-admin | 3.51 ▲0.16 | 45.62 ▼13.27 |
Posts /wp-admin/edit.php | 3.63 ▲0.27 | 46.04 ▲1.48 |
Add New Post /wp-admin/post-new.php | 6.09 ▲0.20 | 85.17 ▼10.23 |
Media Library /wp-admin/upload.php | 3.44 ▲0.20 | 34.41 ▼0.90 |
Name Restrictions /wp-admin/users.php?page=restrict-usernames/restrict-usernames.php | 3.50 | 33.06 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Restrict Usernames: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲83 | 13.22 ▼1.43 | 1.90 ▲0.18 | 43.47 ▼4.54 |
Dashboard /wp-admin | 2,213 ▲22 | 4.86 ▼1.11 | 102.20 ▼4.76 | 40.62 ▲2.59 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.05 ▲0.00 | 36.54 ▼0.83 | 34.74 ▲0.32 |
Add New Post /wp-admin/post-new.php | 1,536 ▲7 | 23.34 ▲4.91 | 654.13 ▲21.46 | 61.31 ▲5.31 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.24 ▼0.04 | 96.26 ▼6.91 | 41.45 ▼4.44 |
Name Restrictions /wp-admin/users.php?page=restrict-usernames/restrict-usernames.php | 991 | 1.71 | 27.37 | 39.38 |
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
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
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 perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/restrict-usernames/tests/bootstrap.php
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/restrict-usernames/tests/bootstrap.php on line 17
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/restrict-usernames/tests/bootstrap.php on line 17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: username, users, restrictions, privacy, coffee2code...
restrict-usernames/restrict-usernames.php Passed 13 tests
"Restrict Usernames" version 3.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
Restrict the usernames that new users may use when registering for your site.
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
Good job! No executable or dangerous file extensions detected1,171 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 251 | 593 | 1,122 |
Bourne Shell | 1 | 7 | 3 | 22 |
XML | 1 | 0 | 0 | 14 |
Markdown | 1 | 14 | 0 | 13 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 61.67 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 131.00 |
Average method complexity | 2.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 1 | 33.33% |
▷ Concrete classes | 2 | 66.67% |
▷ Final classes | 1 | 50.00% |
Methods | 94 | |
▷ Static methods | 8 | 8.51% |
▷ Public methods | 80 | 85.11% |
▷ Protected methods | 13 | 13.83% |
▷ Private methods | 1 | 1.06% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
c2c_minilogo.png | 3.49KB | 1.91KB | ▼ 45.43% |