Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼149.52ms] Passed 4 tests
Server-side resources used by Logged-in-only
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.00 | 58.02 ▲18.16 |
Dashboard /wp-admin | 3.06 ▲0.01 | 46.33 ▼3.22 |
Posts /wp-admin/edit.php | 3.11 ▲0.01 | 47.49 ▼11.17 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.01 | 90.36 ▼575.39 |
Media Library /wp-admin/upload.php | 3.01 ▲0.00 | 31.68 ▼8.28 |
Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Logged-in-only
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,679 ▲107 | 15.96 ▲0.40 | 9.91 ▲0.73 | 76.83 ▲23.49 |
Dashboard /wp-admin | 2,967 ▲36 | 5.94 ▼0.03 | 136.55 ▼25.18 | 103.63 ▼29.52 |
Posts /wp-admin/edit.php | 2,736 ▼3 | 2.71 ▼0.00 | 66.30 ▼9.55 | 93.41 ▼14.92 |
Add New Post /wp-admin/post-new.php | 1,672 ▲91 | 18.84 ▼1.55 | 360.65 ▼55.06 | 110.45 ▼9.34 |
Media Library /wp-admin/upload.php | 1,807 ▼0 | 5.03 ▲0.02 | 149.21 ▼15.70 | 119.48 ▼19.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 50% 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
Please fix the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-logged-in-only/loggedinonly.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: simple, password, protect, redirect, rest api...
wp-logged-in-only/loggedinonly.php 85% from 13 tests
"Logged-in-only" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("wp-logged-in-only.php" instead of "loggedinonly.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 159 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin21 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 6 | 18 | 21 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin