Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼4.21ms] Passed 4 tests
Server-side resources used by Cookie consent for developers
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 47.68 ▲7.39 |
Dashboard /wp-admin | 3.35 ▲0.04 | 50.27 ▼3.32 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 52.14 ▼3.27 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 92.07 ▼9.46 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 38.03 ▼0.80 |
Cookie consent for developers /wp-admin/options-general.php?page=ntgccPage | 3.24 | 36.96 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Cookie consent for developers
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,817 ▲56 | 14.35 ▼0.04 | 2.61 ▲0.91 | 44.99 ▲1.96 |
Dashboard /wp-admin | 2,201 ▲24 | 5.65 ▲0.08 | 81.88 ▼16.48 | 37.18 ▼4.41 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.02 ▲0.07 | 35.71 ▼3.59 | 31.45 ▼4.15 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.00 ▼0.08 | 662.49 ▼22.34 | 57.54 ▼5.37 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.24 ▲0.03 | 107.07 ▲1.26 | 43.97 ▼4.79 |
Cookie consent for developers /wp-admin/options-general.php?page=ntgccPage | 1,038 | 2.00 | 23.25 | 36.58 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/cookie-consent-for-developers/uninstall.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cookie-consent-for-developers/public/partials/ntg-cookie-consent-public-display.php:31
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
cookie-consent-for-developers/ntg-cookie-consent.php 85% from 13 tests
The principal PHP file in "Cookie consent for developers" v. 1.7.1 is loaded by WordPress automatically on each request
It is important to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cookie-consent-for-developers.php" instead of "ntg-cookie-consent.php")
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
Good job! No executable or dangerous file extensions detected774 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 182 | 612 | 557 |
CSS | 4 | 21 | 15 | 131 |
PO File | 1 | 23 | 26 | 83 |
JavaScript | 1 | 2 | 27 | 3 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 2.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 1.43 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 2 | 6.67% |
▷ Public methods | 25 | 83.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 16.67% |
Functions | 20 | |
▷ Named functions | 20 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/03GO_logo.png | 10.81KB | 5.09KB | ▼ 52.91% |