84% cookie-maestro

Code Review | Cookie Maestro

WordPress plugin Cookie Maestro scored84%from 54 tests.

About plugin

  • Plugin page: cookie-maestro
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2018
  • Latest release: May 22, 2019
  • Number of updates: 14
  • Update frequency: every 19.4 days
  • Top authors: denvers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /780 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
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼12.07ms] Passed 4 tests

Analyzing server-side resources used by Cookie Maestro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.40 ▲0.04
Dashboard /wp-admin3.31 ▼0.0353.47 ▼18.07
Posts /wp-admin/edit.php3.36 ▲0.0149.34 ▼8.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.18 ▼22.17
Media Library /wp-admin/upload.php3.23 ▲0.0139.47 ▲2.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Cookie Maestro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.73 ▼0.662.20 ▲0.1445.31 ▼1.44
Dashboard /wp-admin2,219 ▲285.78 ▼0.1196.94 ▼12.5842.84 ▲2.73
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0037.13 ▼1.7134.23 ▼3.97
Add New Post /wp-admin/post-new.php1,546 ▲323.16 ▲0.08643.32 ▼33.7549.93 ▼14.85
Media Library /wp-admin/upload.php1,404 ▲194.32 ▲0.1193.72 ▼8.1444.92 ▼0.40

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Everything seems fine, however this is by no means 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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/cookie-maestro/templates/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cookie-maestro/cookiemaestro.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

cookie-maestro/cookiemaestro.php 92% from 13 tests

Analyzing the main PHP file in "Cookie Maestro" version 1.1.1
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cookie-maestro.php" instead of "cookiemaestro.php")

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
No dangerous file extensions were detected55 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2213055

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin