Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/tng-accept-cookies/tng-accept-cookies.php+170
Function create_function() is deprecated
Server metrics [RAM: ▼1.91MB] [CPU: ▼52.98ms] Passed 4 tests
Analyzing server-side resources used by TNG Accept Cookies
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.07 ▼1.39 | 4.80 ▼39.88 |
Dashboard /wp-admin | 2.09 ▼1.21 | 7.57 ▼42.98 |
Posts /wp-admin/edit.php | 2.10 ▼1.26 | 6.54 ▼40.67 |
Add New Post /wp-admin/post-new.php | 2.09 ▼3.79 | 6.27 ▼88.37 |
Media Library /wp-admin/upload.php | 2.09 ▼1.13 | 5.45 ▼31.94 |
Accept Cookies /wp-admin/options-general.php?page=tng-accept-cookies | 2.10 | 6.04 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for TNG Accept Cookies
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,976 ▲190 | 13.50 ▼0.85 | 10.80 ▲8.87 | 52.24 ▲6.86 |
Dashboard /wp-admin | 2,202 ▲25 | 5.61 ▼0.06 | 86.09 ▼2.77 | 41.35 ▼1.78 |
Posts /wp-admin/edit.php | 2,107 ▲4 | 1.97 ▲0.03 | 36.05 ▲0.15 | 36.76 ▲1.21 |
Add New Post /wp-admin/post-new.php | 1,529 ▼5 | 23.85 ▲1.02 | 677.03 ▲67.49 | 53.33 ▲10.19 |
Media Library /wp-admin/upload.php | 1,398 ▼2 | 4.19 ▼0.02 | 97.05 ▼8.10 | 44.39 ▼2.85 |
Accept Cookies /wp-admin/options-general.php?page=tng-accept-cookies | 883 | 2.03 | 26.17 | 29.58 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/tng-accept-cookies/tng-accept-cookies.php+170
Function create_function() is deprecated
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
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
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=tng-accept-cookies
- > Deprecated in wp-content/plugins/tng-accept-cookies/tng-accept-cookies.php+170
Function create_function() is deprecated
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=tng-accept-cookies
- > Notice in wp-content/plugins/tng-accept-cookies/inc/accept-cookies-settings.php+164
Trying to access array offset on value of type bool
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
Please fix the following items
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tng-accept-cookies/inc/accept-cookies-settings.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)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: eu regulations, cookie law, eu cookie directive, cookies, eu cookie law...
tng-accept-cookies/tng-accept-cookies.php Passed 13 tests
The principal PHP file in "TNG Accept Cookies" v. 0.3.2 is loaded by WordPress automatically on each request
59 characters long description:
A plugin adding a cookie accept (requeried by Swedish law).
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin405 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 44 | 80 | 229 |
PO File | 1 | 1,063 | 2,182 | 106 |
JavaScript | 1 | 23 | 21 | 70 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 8.00 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 2.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 14 | |
▷ Static methods | 0 | 0.00% |
▷ 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
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected