Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/lock-pattern/pattern_lock.php+68
Trying to access array offset on value of type bool
Server metrics [RAM: ▲0.05MB] [CPU: ▼2.26ms] Passed 4 tests
Server-side resources used by Pattern Lock
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 34.73 ▼6.67 |
Dashboard /wp-admin | 3.36 ▲0.06 | 44.54 ▼5.02 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 54.14 ▲7.49 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 92.53 ▲1.89 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 35.93 ▲0.75 |
Pattern Lock /wp-admin/admin.php?page=pattern_lock | 3.25 | 31.96 |
Settings /wp-admin/admin.php?page=pattern_lock_settings | 3.27 | 30.95 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_pattern_lock |
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
pattern_lock_options |
Browser metrics Passed 4 tests
A check of browser resources used by Pattern Lock
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,907 ▲161 | 13.70 ▼0.89 | 1.70 ▼0.11 | 40.84 ▼9.65 |
Dashboard /wp-admin | 2,313 ▲125 | 5.09 ▲0.19 | 120.31 ▲6.21 | 37.29 ▼13.52 |
Posts /wp-admin/edit.php | 2,196 ▲107 | 2.25 ▲0.24 | 48.10 ▲9.83 | 35.64 ▼0.22 |
Add New Post /wp-admin/post-new.php | 1,603 ▲66 | 23.27 ▼0.06 | 691.35 ▲16.44 | 40.58 ▼22.06 |
Media Library /wp-admin/upload.php | 1,492 ▲104 | 4.30 ▲0.09 | 117.70 ▲13.90 | 42.28 ▼3.84 |
Pattern Lock /wp-admin/admin.php?page=pattern_lock | 917 | 1.83 | 42.50 | 27.21 |
Settings /wp-admin/admin.php?page=pattern_lock_settings | 1,091 | 1.98 | 37.55 | 30.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Zombie tables were found after uninstall: 1 table
- wp_pattern_lock
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- pattern_lock_options
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- > GET request to /wp-admin/admin.php?page=pattern_lock
- > Notice in wp-content/plugins/lock-pattern/inc/pattern_lock_admin.php+19
Trying to get property 'lock_password' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=pattern_lock_settings
- > POST request to /wp-admin/admin-ajax.php
- > Warning in wp-content/plugins/lock-pattern/inc/pattern_request_check.php+7
count(): Parameter must be an array or an object that implements Countable
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lock-pattern/pattern_lock.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: wp-admin, lock, password, pattern, pattern settings...
lock-pattern/pattern_lock.php 92% from 13 tests
The primary PHP file in "Pattern Lock" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lock-pattern.php" instead of "pattern_lock.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,135 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 380 | 170 | 1,555 |
PHP | 9 | 12 | 60 | 569 |
CSS | 1 | 0 | 0 | 11 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 13.00 |
▷ Minimum class complexity | 13.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 1.86 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.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 | 14 | |
▷ Static methods | 1 | 7.14% |
▷ Public methods | 14 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin