Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.16MB] [CPU: ▼2.94ms] Passed 4 tests
An overview of server-side resources used by GDPR Cookie Banner
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.16 | 41.21 ▼3.85 |
Dashboard /wp-admin | 3.46 ▲0.16 | 47.68 ▼2.52 |
Posts /wp-admin/edit.php | 3.57 ▲0.22 | 48.37 ▼1.81 |
Add New Post /wp-admin/post-new.php | 6.06 ▲0.18 | 91.29 ▼3.59 |
Media Library /wp-admin/upload.php | 3.38 ▲0.16 | 35.11 ▲1.17 |
GDPR Cookie Banner /wp-admin/options-general.php?page=gdpr-cookie-banner | 3.36 | 33.39 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by GDPR Cookie Banner
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,946 ▲211 | 13.94 ▼0.44 | 7.24 ▲5.49 | 35.11 ▼8.02 |
Dashboard /wp-admin | 2,235 ▲47 | 5.15 ▲0.10 | 112.26 ▼6.27 | 40.66 ▼5.93 |
Posts /wp-admin/edit.php | 2,123 ▲34 | 2.35 ▲0.32 | 44.88 ▲5.85 | 35.31 ▲4.89 |
Add New Post /wp-admin/post-new.php | 1,537 ▲3 | 23.46 ▲0.43 | 676.75 ▲7.24 | 36.86 ▼22.14 |
Media Library /wp-admin/upload.php | 1,411 ▲23 | 4.55 ▲0.30 | 97.15 ▼4.31 | 41.83 ▼1.56 |
GDPR Cookie Banner /wp-admin/options-general.php?page=gdpr-cookie-banner | 1,493 | 2.14 | 37.73 | 38.18 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gdpr-cookie-banner/public/partials/gdpr-cookie-banner-public-display.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/gdpr-cookie-banner/admin/partials/gdpr-cookie-banner-admin-display.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (Admin screen for the plugin settings.), #2 (This is the second screen shot which shows how banner will look like on the front-end after aplying the settings.)
gdpr-cookie-banner/gdpr-cookie-banner.php Passed 13 tests
The primary PHP file in "GDPR Cookie Banner" version 1.0.0 is used by WordPress to initiate all plugin functionality
88 characters long description:
GDPR Cookie Banner helps website owners to display a notice that they are using cookies.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,044 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 236 | 659 | 503 |
JavaScript | 3 | 91 | 38 | 307 |
CSS | 3 | 16 | 8 | 234 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 5.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 21.00 |
Average method complexity | 1.76 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.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 | 41 | |
▷ Static methods | 2 | 4.88% |
▷ Public methods | 36 | 87.80% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 12.20% |
Functions | 3 | |
▷ Named functions | 3 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/gdpr-preview-large-top.png | 3.12KB | 0.63KB | ▼ 79.64% |
public/images/gdpr-preview-medium-top.png | 3.04KB | 0.54KB | ▼ 82.11% |
admin/images/gdpr-preview-small-bottom.png | 2.65KB | 0.47KB | ▼ 82.12% |
public/images/cookie-closing-icon.png | 1.29KB | 0.34KB | ▼ 73.28% |
public/images/gdpr-preview-small-top.png | 2.77KB | 0.47KB | ▼ 82.93% |