Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼1.85MB] [CPU: ▼55.55ms] Passed 4 tests
An overview of server-side resources used by Post Password Token
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.13 ▼1.33 | 5.45 ▼37.39 |
Dashboard /wp-admin | 2.15 ▼1.15 | 7.53 ▼45.29 |
Posts /wp-admin/edit.php | 2.15 ▼1.20 | 6.49 ▼45.66 |
Add New Post /wp-admin/post-new.php | 2.15 ▼3.73 | 6.94 ▼93.87 |
Media Library /wp-admin/upload.php | 2.15 ▼1.08 | 7.77 ▼32.20 |
Post Password Token /wp-admin/options-general.php?page=post-password-token | 2.15 | 8.49 |
Server storage [IO: ▲0.60MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for Post Password Token
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.27 ▼0.03 | 2.17 ▲0.37 | 43.74 ▼0.32 |
Dashboard /wp-admin | 2,202 ▲25 | 5.61 ▼0.01 | 87.90 ▼0.15 | 38.19 ▼7.54 |
Posts /wp-admin/edit.php | 2,104 ▲7 | 2.01 ▼0.01 | 38.77 ▲2.64 | 38.13 ▼1.25 |
Add New Post /wp-admin/post-new.php | 1,540 ▲8 | 23.45 ▲0.13 | 635.06 ▼30.77 | 52.14 ▼2.39 |
Media Library /wp-admin/upload.php | 1,404 ▲13 | 4.19 ▼0.02 | 96.49 ▼6.98 | 41.81 ▼3.31 |
Post Password Token /wp-admin/options-general.php?page=post-password-token | 1,081 | 2.06 | 27.31 | 46.47 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the post-password-token-sidebar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=post-password-token
- > User notice in wp-includes/functions.php+5905
Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the post-password-token-sidebar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=post-password-token
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the post-password-token-sidebar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 9× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'PPT\\Test\\PPTTestCase' not found in wp-content/plugins/post-password-plugin/test/tests/PPTAdminTest.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-password-plugin/templates/meta-box-draft.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-password-plugin/templates/meta-box-no-password.php:2
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/post-password-plugin/test/tests/PPTTestCase.php:10
- > PHP Fatal error
Uncaught Error: Class 'PPT\\Test\\PPTTestCase' not found in wp-content/plugins/post-password-plugin/test/tests/PPTRestApiTest.php:8
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/post-password-plugin/templates/meta-box.php:3
- > PHP Fatal error
Uncaught Error: Class 'PPT\\Test\\PPTTestCase' not found in wp-content/plugins/post-password-plugin/test/tests/PPTInstallTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'PPT\\Test\\PPTTestCase' not found in wp-content/plugins/post-password-plugin/test/tests/PPTCoreTest.php:6
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/post-password-plugin/templates/settings.php:8
- > 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 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: access, password, hidden, protected, post...
post-password-plugin/post-password-token.php 77% from 13 tests
Analyzing the main PHP file in "Post Password Token" version 2.0.3
It is important to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 210 characters long)
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("post-password-plugin.php" instead of "post-password-token.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin2,179 lines of code in 49 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 35 | 430 | 770 | 1,801 |
JavaScript | 6 | 33 | 5 | 225 |
CSS | 2 | 0 | 0 | 49 |
JSON | 3 | 0 | 0 | 42 |
XML | 1 | 1 | 0 | 33 |
make | 1 | 6 | 0 | 21 |
Sass | 1 | 0 | 0 | 8 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 8.32 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 48.00 |
Average method complexity | 2.15 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 3 | |
Classes | 16 | |
▷ Abstract classes | 2 | 12.50% |
▷ Concrete classes | 14 | 87.50% |
▷ Final classes | 0 | 0.00% |
Methods | 124 | |
▷ Static methods | 19 | 15.32% |
▷ Public methods | 117 | 94.35% |
▷ Protected methods | 4 | 3.23% |
▷ Private methods | 3 | 2.42% |
Functions | 11 | |
▷ Named functions | 6 | 54.55% |
▷ Anonymous functions | 5 | 45.45% |
Constants | 17 | |
▷ Global constants | 10 | 58.82% |
▷ Class constants | 7 | 41.18% |
▷ Public constants | 7 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/warning-stripes.png | 0.38KB | 0.35KB | ▼ 7.44% |
img/lock.png | 0.42KB | 0.39KB | ▼ 7.60% |