Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▲430.58ms] 50% from 4 tests
Analyzing server-side resources used by MetaLocker
It is recommended to improve the following
- CPU: Total CPU usage must kept under 500.00ms (currently 632.87ms on /wp-admin/admin.php?page=metalocker-activation)
- Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 430.58ms on /wp-admin/admin.php?page=metalocker-activation)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.74 ▲0.28 | 52.63 ▲13.74 |
Dashboard /wp-admin | 3.36 ▲0.06 | 609.30 ▲556.68 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 634.22 ▲580.71 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 664.74 ▲571.17 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 624.93 ▲590.22 |
Meta Locker /wp-admin/admin.php?page=metalocker-tos | 3.25 | 618.23 |
Settings /wp-admin/admin.php?page=metalocker-settings | 3.25 | 627.72 |
Plugin Activation /wp-admin/admin.php?page=metalocker-activation | 3.28 | 632.87 |
Server storage [IO: ▲3.52MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 95 new files
Database: 2 new tables, 8 new options
New tables |
---|
meta_wallet_connections |
metalocker_sessions |
New WordPress options |
---|
meta_private_key |
widget_recent-comments |
meta_public_key |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for MetaLocker
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,034 ▲288 | 19.26 ▲5.01 | 267.35 ▲265.72 | 38.24 ▼4.11 |
Dashboard /wp-admin | 2,253 ▲65 | 5.87 ▼0.03 | 103.43 ▼3.28 | 41.67 ▼0.91 |
Posts /wp-admin/edit.php | 2,135 ▲43 | 2.02 ▲0.02 | 41.62 ▲4.39 | 36.28 ▲1.08 |
Add New Post /wp-admin/post-new.php | 6,225 ▲4,704 | 19.50 ▼3.68 | 889.33 ▲287.89 | 55.66 ▲6.47 |
Media Library /wp-admin/upload.php | 1,435 ▲44 | 4.15 ▼0.11 | 108.18 ▲5.03 | 48.12 ▲1.67 |
Meta Locker /wp-admin/admin.php?page=metalocker-tos | 965 | 2.18 | 22.42 | 32.13 |
Settings /wp-admin/admin.php?page=metalocker-settings | 2,104 | 2.27 | 46.04 | 44.02 |
Plugin Activation /wp-admin/admin.php?page=metalocker-activation | 860 | 2.04 | 34.43 | 30.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The plugin did not uninstall successfully, leaving 2 tables in the database
- meta_wallet_connections
- metalocker_sessions
- This plugin did not uninstall successfully, leaving 8 options in the database
- meta_private_key
- db_upgraded
- theysaidso_admin_options
- meta_public_key
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
- 12× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-locker/frontend/hooks.php:13
- > PHP Fatal error
Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/meta-locker/vendor/jaybizzle/crawler-detect/src/Fixtures/Exclusions.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/meta-locker/admin/class-settings-page.php:57
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/meta-locker/frontend/templates/popup.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/meta-locker/meta-locker.php:14
- > PHP Fatal error
Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/meta-locker/admin/class-sessions-table.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-locker/admin/class-license-manager.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meta-locker/admin/class-terms-page.php:23
- > PHP Fatal error
Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/meta-locker/vendor/jaybizzle/crawler-detect/src/Fixtures/Headers.php:14
- > PHP Fatal error
Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/meta-locker/vendor/jaybizzle/crawler-detect/src/Fixtures/Crawlers.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: content-locker, password-protected, protected, protect, private
meta-locker/meta-locker.php Passed 13 tests
Analyzing the main PHP file in "MetaLocker" version 1.2.0
115 characters long description:
A content locker WordPress plugin. Users are required to login with their crypto wallet to view the locked content.
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
Success! There were no dangerous files found in this plugin15,888 lines of code in 78 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 10 | 1 | 0 | 8,363 |
PHP | 37 | 617 | 1,429 | 5,799 |
JavaScript | 19 | 126 | 98 | 902 |
Markdown | 4 | 185 | 0 | 555 |
Sass | 2 | 34 | 0 | 202 |
YAML | 2 | 15 | 0 | 64 |
CSS | 4 | 1 | 1 | 3 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 15.05 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 76.00 |
Average method complexity | 3.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 22.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 21 | |
▷ Abstract classes | 1 | 4.76% |
▷ Concrete classes | 20 | 95.24% |
▷ Final classes | 4 | 20.00% |
Methods | 130 | |
▷ Static methods | 58 | 44.62% |
▷ Public methods | 104 | 80.00% |
▷ Protected methods | 1 | 0.77% |
▷ Private methods | 25 | 19.23% |
Functions | 25 | |
▷ Named functions | 22 | 88.00% |
▷ Anonymous functions | 3 | 12.00% |
Constants | 17 | |
▷ Global constants | 5 | 29.41% |
▷ Class constants | 12 | 70.59% |
▷ Public constants | 3 | 25.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/walletconnect.png | 29.91KB | 12.08KB | ▼ 59.61% |