84% real-cookie-banner-color-schemes

Code Review | Real Cookie Banner - Color schemes

WordPress plugin Real Cookie Banner - Color schemes scored84%from 54 tests.

About plugin

  • Plugin page: real-cookie-banne...
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.10-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2022
  • Latest release: Nov 14, 2023
  • Number of updates: 27
  • Update frequency: every 24.9 days
  • Top authors: wasiwarez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,458 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.97ms] Passed 4 tests

This is a short check of server-side resources used by Real Cookie Banner - Color schemes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.37 ▼3.85
Dashboard /wp-admin3.31 ▼0.0447.34 ▼15.43
Posts /wp-admin/edit.php3.36 ▲0.0047.69 ▲2.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.27 ▼2.97
Media Library /wp-admin/upload.php3.23 ▲0.0033.55 ▼1.62

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Real Cookie Banner - Color schemes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.25 ▼0.132.12 ▲0.4544.57 ▼0.06
Dashboard /wp-admin2,192 ▲235.61 ▼0.1094.94 ▼10.3240.81 ▼5.07
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0740.92 ▲4.9235.96 ▲1.30
Add New Post /wp-admin/post-new.php1,526 ▼023.14 ▼0.02607.74 ▼66.4257.08 ▼7.72
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0298.94 ▲0.9540.35 ▼0.68

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/real-cookie-banner-color-schemes/real-cookie-banner-color-schemes.php

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: color, cookie, real cookie banner, schemes, banner

real-cookie-banner-color-schemes/real-cookie-banner-color-schemes.php 85% from 13 tests

"Real Cookie Banner - Color schemes" version 1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin898 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP13199328
PO File36666295
JavaScript22730275

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected