Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼142.83ms] Passed 4 tests
A check of server-side resources used by Defender
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.86 ▲0.03 | 2,152.88 ▲2,118.50 |
Dashboard /wp-admin | 3.08 ▲0.03 | 47.57 ▲1.63 |
Posts /wp-admin/edit.php | 3.14 ▲0.03 | 43.47 ▼1.38 |
Add New Post /wp-admin/post-new.php | 5.44 ▲0.01 | 93.36 ▼570.95 |
Media Library /wp-admin/upload.php | 3.03 ▲0.03 | 31.37 ▼0.63 |
Defender /wp-admin/plugins.php?page=Defender | 3.09 | 35.04 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options |
---|
redirect_to |
def_login |
Browser metrics Passed 4 tests
Checking browser requirements for Defender
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,686 ▲80 | 16.27 ▲0.60 | 8.46 ▼0.34 | 49.56 ▲1.02 |
Dashboard /wp-admin | 2,980 ▲49 | 5.95 ▼0.04 | 136.61 ▼2.34 | 105.30 ▼19.16 |
Posts /wp-admin/edit.php | 2,746 ▲7 | 2.69 ▲0.01 | 62.18 ▼0.48 | 95.44 ▲4.91 |
Add New Post /wp-admin/post-new.php | 1,620 ▲120 | 21.59 ▲2.84 | 264.62 ▼110.12 | 106.53 ▲0.86 |
Media Library /wp-admin/upload.php | 1,814 ▲7 | 5.04 ▲0.03 | 144.18 ▼19.29 | 117.18 ▼3.07 |
Defender /wp-admin/plugins.php?page=Defender | 2,185 | 2.10 | 59.08 | 82.09 |
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
- Zombie WordPress options detected upon uninstall: 2 options
- redirect_to
- def_login
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 251 occurences, only the last one shown
- > GET request to /wp-admin/plugins.php?page=Defender
- > Warning in wp-content/plugins/defender-by-played/admin.php+53
in_array() expects parameter 2 to be array, bool given
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
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/defender-by-played/blocked.php
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/defender-by-played/admin.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/defender-by-played/defender.php:12
- > 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 96% from 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
4 plugin tags: anti-spam, spam, user-control, block
defender-by-played/defender.php 92% from 13 tests
This is the main PHP file of "Defender" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("defender-by-played.php" instead of "defender.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected220 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 26 | 10 | 179 |
JavaScript | 1 | 4 | 0 | 41 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.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
PNG images were not found in this plugin