Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.05MB] [CPU: ▼5.42ms] Passed 4 tests
Analyzing server-side resources used by Lockr
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 43.54 ▲3.92 |
Dashboard /wp-admin | 3.35 ▲0.05 | 48.85 ▼5.68 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 49.23 ▼2.49 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 85.78 ▼15.80 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 39.81 ▲2.31 |
Add Key /wp-admin/admin.php?page=lockr-add-key | 3.48 | 435.25 |
All Keys /wp-admin/admin.php?page=lockr | 3.33 | 276.41 |
Lockr Configuration /wp-admin/admin.php?page=lockr-site-config | 3.39 | 287.66 |
Edit Key /wp-admin/admin.php?page=lockr-edit-key | 3.33 | 271.31 |
Override Option /wp-admin/admin.php?page=lockr-override-option | 7.51 | 262.54 |
Server storage [IO: ▲1.31MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 286 new files
Database: 1 new table, 9 new options
New tables |
---|
wp_lockr_keys |
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
lockr_dev_abstract_migrated |
lockr_prod_abstract_migrated |
widget_recent-comments |
lockr_db_version |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Lockr
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,883 ▲122 | 14.74 ▲0.36 | 1.75 ▼0.03 | 42.81 ▲2.67 |
Dashboard /wp-admin | 2,293 ▲87 | 5.02 ▲0.15 | 116.09 ▲8.11 | 38.56 ▼9.85 |
Posts /wp-admin/edit.php | 2,172 ▲72 | 2.03 ▼0.00 | 34.53 ▼1.28 | 35.90 ▲3.28 |
Add New Post /wp-admin/post-new.php | 1,574 ▲45 | 23.42 ▲5.53 | 678.04 ▲78.89 | 57.69 ▲3.38 |
Media Library /wp-admin/upload.php | 1,468 ▲65 | 4.22 ▲0.02 | 108.01 ▲3.77 | 49.65 ▲2.10 |
Add Key /wp-admin/admin.php?page=lockr-add-key | 844 | 2.07 | 24.57 | 24.70 |
All Keys /wp-admin/admin.php?page=lockr | 838 | 2.02 | 24.21 | 26.25 |
Lockr Configuration /wp-admin/admin.php?page=lockr-site-config | 1,079 | 2.22 | 25.23 | 35.88 |
Edit Key /wp-admin/admin.php?page=lockr-edit-key | 837 | 2.04 | 24.31 | 22.99 |
Override Option /wp-admin/admin.php?page=lockr-override-option | 862 | 2.20 | 23.39 | 26.05 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- Zombie tables detected upon uninstall: 1 table
- wp_lockr_keys
- This plugin does not fully uninstall, leaving 9 options in the database
- widget_recent-posts
- lockr_db_version
- lockr_dev_abstract_migrated
- lockr_prod_abstract_migrated
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 9× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/lockr/lockr-admin-add.php
- > /wp-content/plugins/lockr/lockr-admin-override.php
- > /wp-content/plugins/lockr/lockr-admin.php
- > /wp-content/plugins/lockr/lockr-admin-config.php
- > /wp-content/plugins/lockr/lockr.php
- > /wp-content/plugins/lockr/class-lockr-status.php
- > /wp-content/plugins/lockr/lockr-secure-posts.php
- > /wp-content/plugins/lockr/lockr-admin-edit.php
- > /wp-content/plugins/lockr/lockr-overrides.php
- 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/lockr/vendor/psr/http-message/src/ServerRequestInterface.php:43
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/lockr/vendor/lockr/lockr/tests/KeyWrapper/LockrAes256CbcSha256RawKeyWrapperTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/lockr/vendor/guzzlehttp/promises/src/AggregateException.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/lockr/vendor/guzzlehttp/psr7/src/FnStream.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/lockr/vendor/guzzlehttp/psr7/src/Stream.php:11
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/lockr/vendor/guzzlehttp/promises/src/EachPromise.php:8
- > PHP Fatal error
Uncaught Error: Interface 'Lockr\\KeyWrapper\\KeyWrapperInterface' not found in wp-content/plugins/lockr/vendor/lockr/lockr/src/KeyWrapper/LockrAes256CbcSha256KeyWrapper.php:4
- > PHP Fatal error
Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/lockr/vendor/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php:5
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/lockr/vendor/guzzlehttp/promises/src/Promise.php:9
- > PHP Fatal error
Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/lockr/vendor/defuse/php-encryption/src/Exception/IOException.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== lockr ===
)
lockr/lockr.php 92% from 13 tests
The principal PHP file in "Lockr" v. 3.0.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 203 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin28,104 lines of code in 263 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 176 | 3,722 | 8,249 | 18,571 |
Markdown | 27 | 1,666 | 0 | 4,824 |
YAML | 29 | 129 | 89 | 3,258 |
JSON | 15 | 0 | 0 | 1,157 |
JavaScript | 2 | 7 | 0 | 87 |
XML | 5 | 7 | 6 | 78 |
Bourne Again Shell | 4 | 17 | 0 | 64 |
make | 2 | 13 | 4 | 33 |
CSS | 1 | 4 | 0 | 19 |
Dockerfile | 1 | 8 | 0 | 10 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
The following items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 112)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 13.35 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 256.00 |
Average method complexity | 2.70 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 112.00 |
Code structure | ||
---|---|---|
Namespaces | 24 | |
Interfaces | 22 | |
Traits | 4 | |
Classes | 126 | |
▷ Abstract classes | 2 | 1.59% |
▷ Concrete classes | 124 | 98.41% |
▷ Final classes | 18 | 14.52% |
Methods | 1,159 | |
▷ Static methods | 194 | 16.74% |
▷ Public methods | 958 | 82.66% |
▷ Protected methods | 21 | 1.81% |
▷ Private methods | 180 | 15.53% |
Functions | 228 | |
▷ Named functions | 127 | 55.70% |
▷ Anonymous functions | 101 | 44.30% |
Constants | 131 | |
▷ Global constants | 4 | 3.05% |
▷ Class constants | 127 | 96.95% |
▷ Public constants | 127 | 100.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
There were not PNG files found in your plugin