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: ▼4.77ms] Passed 4 tests
A check of server-side resources used by Only for Registered Users
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 35.43 ▼5.25 |
Dashboard /wp-admin | 3.31 ▲0.01 | 46.33 ▼2.71 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 44.44 ▼2.73 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 89.49 ▼8.39 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 32.70 ▼1.16 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Only for Registered Users
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.22 ▼1.18 | 1.64 ▼0.17 | 43.17 ▲0.97 |
Dashboard /wp-admin | 2,206 ▲18 | 4.85 ▼0.22 | 112.23 ▼3.76 | 41.73 ▼3.75 |
Posts /wp-admin/edit.php | 2,095 ▲9 | 2.00 ▼0.02 | 39.01 ▲1.75 | 33.79 ▼0.66 |
Add New Post /wp-admin/post-new.php | 6,247 ▲4,728 | 21.69 ▼1.35 | 866.06 ▲176.56 | 65.29 ▲0.42 |
Media Library /wp-admin/upload.php | 1,388 ▲3 | 4.31 ▲0.10 | 96.34 ▼19.21 | 43.21 ▼4.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking 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
Please take a closer look at the following
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/only-for-registered-users/post_meta_box.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/only-for-registered-users/only-for-registered-users.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
- Tags: You are using too many tags: 12 tag instead of maximum 10
only-for-registered-users/only-for-registered-users.php Passed 13 tests
"Only for Registered Users" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
Make post, page or partial content visible to registered users only
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin144 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 28 | 52 | 102 |
PO File | 1 | 5 | 7 | 29 |
JavaScript | 1 | 5 | 6 | 13 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 11.00 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 3.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 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
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 |
js/regUserOnly.png | 0.93KB | 0.73KB | ▼ 21.20% |