84% cookie-monster

Code Review | Cookie Monster

WordPress plugin Cookie Monster scored84%from 54 tests.

About plugin

  • Plugin page: cookie-monster
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Oct 30, 2014
  • Latest release: Dec 28, 2016
  • Number of updates: 5
  • Update frequency: every 158.0 days
  • Top authors: ohayo-web (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /9,678 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼11.74ms] Passed 4 tests

A check of server-side resources used by Cookie Monster
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1042.40 ▼1.91
Dashboard /wp-admin3.41 ▲0.0646.57 ▼19.38
Posts /wp-admin/edit.php3.52 ▲0.1646.39 ▼3.84
Add New Post /wp-admin/post-new.php6.00 ▲0.1185.78 ▼21.84
Media Library /wp-admin/upload.php3.33 ▲0.0936.72 ▲1.11

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Cookie Monster: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18513.85 ▼0.535.55 ▲3.5942.86 ▲1.11
Dashboard /wp-admin2,236 ▲485.23 ▲0.12100.51 ▼6.8790.48 ▲51.79
Posts /wp-admin/edit.php2,136 ▲472.32 ▲0.2637.85 ▼6.6435.48 ▲0.14
Add New Post /wp-admin/post-new.php1,556 ▲2817.59 ▼0.69695.42 ▲81.7737.45 ▼17.25
Media Library /wp-admin/upload.php1,431 ▲404.45 ▲0.2588.19 ▼13.5869.95 ▲25.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Good news, no errors were detected

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
Please fix the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cookie-monster/admin/partials/cookie-monster-config-advanced.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cookie-monster/public/partials/cookie-monster-public-display.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cookie-monster/admin/partials/cookie-monster-config-texts.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cookie-monster/admin/partials/cookie-monster-admin-display.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cookie-monster/admin/partials/cookie-monster-config-display.php:6

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)
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Captura de un ejemplo de frontend con Cookie Monster funcionando.)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

cookie-monster/cookie-monster.php Passed 13 tests

The entry point to "Cookie Monster" version 1.2.2 is a PHP file that has certain tags in its header comment area
95 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,291 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PO File2744172

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods25.41%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/close.png1.03KB0.25KB▼ 75.33%