Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼138.40ms] Passed 4 tests
A check of server-side resources used by Cookie Confirm
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.90 ▲0.06 | 35.92 ▲8.57 |
Dashboard /wp-admin | 3.12 ▲0.06 | 56.93 ▲11.12 |
Posts /wp-admin/edit.php | 3.17 ▲0.06 | 45.23 ▲0.95 |
Add New Post /wp-admin/post-new.php | 5.47 ▲0.04 | 89.96 ▼567.73 |
Media Library /wp-admin/upload.php | 3.06 ▲0.06 | 43.26 ▲4.60 |
Cookie Confirm /wp-admin/options-general.php?page=cookie_confirm | 3.01 | 26.86 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Cookie Confirm
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,821 ▲225 | 16.26 ▲0.53 | 16.15 ▲6.47 | 48.17 ▼2.24 |
Dashboard /wp-admin | 2,975 ▲47 | 5.86 ▼0.30 | 161.66 ▼32.59 | 104.64 ▼8.99 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.72 ▼0.00 | 65.08 ▼8.24 | 104.61 ▲23.16 |
Add New Post /wp-admin/post-new.php | 1,686 ▲3 | 16.23 ▼2.48 | 448.26 ▲51.72 | 109.84 ▲3.40 |
Media Library /wp-admin/upload.php | 1,815 ▲11 | 5.01 ▼0.02 | 171.92 ▲14.12 | 121.23 ▲7.71 |
Cookie Confirm /wp-admin/options-general.php?page=cookie_confirm | 1,430 | 2.10 | 55.43 | 78.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=cookie_confirm
- > User deprecated in wp-includes/functions.php+5221
screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=cookie_confirm
- > User deprecated in wp-includes/functions.php+5221
get_screen_icon is deprecated since version 3.8.0 with no alternative available.
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
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cookie-confirm/cookie-confirm.php on line 12
- > PHP Fatal error
require_once(): Failed opening required 'WP_PLUGIN_DIR/cookie-confirm/theme-options.php' (include_path='.:/usr/share/php') in wp-content/plugins/cookie-confirm/cookie-confirm.php on line 14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cookie-confirm/theme-options.php:3
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cookie-confirm/cookie-confirm.php on line 10
- > PHP Warning
require_once(WP_PLUGIN_DIR/cookie-confirm/theme-options.php): failed to open stream: No such file or directory in wp-content/plugins/cookie-confirm/cookie-confirm.php on line 14
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
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
Attributes that need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (The unobtrusive, customisable notification), #2 (The admin options area)
cookie-confirm/cookie-confirm.php Passed 13 tests
The main PHP file in "Cookie Confirm" ver. 0.4 adds more information about the plugin and also serves as the entry point for this plugin
130 characters long description:
Cookie Confirm allows you to easily insert a customisable notification for your users to choose and save their cookie preferences.
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
There were no executable files found in this plugin363 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 104 | 46 | 363 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 9.00 |
▷ Minimum class complexity | 9.00 |
▷ Maximum class complexity | 9.00 |
Average method complexity | 3.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 62.59KB | 30.63KB | ▼ 51.05% |
screenshot-2.png | 104.25KB | 39.99KB | ▼ 61.65% |
logo.png | 1.82KB | 1.45KB | ▼ 20.06% |