Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.06ms] Passed 4 tests
Analyzing server-side resources used by Login Logout Shortcode
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 41.12 ▲2.10 |
Dashboard /wp-admin | 3.31 ▲0.01 | 45.95 ▼2.28 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 44.97 ▼4.32 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 90.56 ▲0.91 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 32.62 ▼2.53 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Login Logout Shortcode
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 14.47 ▲0.16 | 1.68 ▼0.14 | 44.85 ▲4.21 |
Dashboard /wp-admin | 2,206 ▲18 | 5.91 ▲1.01 | 112.32 ▼8.78 | 43.07 ▼1.70 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.01 ▲0.01 | 35.84 ▼2.63 | 35.89 ▲1.46 |
Add New Post /wp-admin/post-new.php | 1,525 ▲6 | 23.33 ▲0.23 | 607.22 ▼88.46 | 49.51 ▼12.89 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.31 ▲0.13 | 97.34 ▼10.41 | 41.24 ▼4.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 5× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/login-logout-shortcode/tests/bootstrap.php on line 6
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/login-logout-shortcode/tests/bootstrap.php on line 6
- > PHP Fatal error
require_once(): Failed opening required 'login-logout-shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/login-logout-shortcode/tests/test-login-logout-shortcode.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/login-logout-shortcode/login-logout-shortcode.php:48
- > PHP Warning
require_once(login-logout-shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/login-logout-shortcode/tests/test-login-logout-shortcode.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
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
3 plugin tags: logout, shortcode, login
login-logout-shortcode/login-logout-shortcode.php Passed 13 tests
The primary PHP file in "Login Logout Shortcode" version 1.1.0 is used by WordPress to initiate all plugin functionality
76 characters long description:
A single shortcode you can place anywhere to allow visitors to login/logout.
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 plugin553 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Bourne Shell | 3 | 41 | 14 | 197 |
PHP | 3 | 54 | 10 | 135 |
Dockerfile | 1 | 23 | 4 | 119 |
Bourne Again Shell | 2 | 7 | 1 | 71 |
Markdown | 1 | 11 | 0 | 17 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.05 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.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 | 11 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 11 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/banner-772x250.png | 20.38KB | 9.19KB | ▼ 54.92% |
assets/icon-256x256.png | 8.62KB | 4.03KB | ▼ 53.18% |