90% cookiecode

Code Review | CookieCode

WordPress plugin CookieCode scored90%from 54 tests.

About plugin

  • Plugin page: cookiecode
  • Plugin version: 2.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Jun 3, 2022
  • Number of updates: 11
  • Update frequency: every 40.3 days
  • Top authors: cookiecode (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /2,975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.41ms] Passed 4 tests

An overview of server-side resources used by CookieCode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0448.47 ▲6.57
Dashboard /wp-admin3.33 ▲0.0244.89 ▼7.06
Posts /wp-admin/edit.php3.38 ▲0.0250.53 ▲5.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.21 ▼14.58
Media Library /wp-admin/upload.php3.25 ▲0.0234.39 ▼1.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
cookiecode-plugin-options-version
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CookieCode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12414.47 ▲0.182.25 ▲0.3840.40 ▼6.69
Dashboard /wp-admin2,248 ▲605.89 ▲0.0195.28 ▼10.7438.19 ▼4.36
Posts /wp-admin/edit.php2,128 ▲422.01 ▼0.0240.26 ▲2.7036.01 ▼0.14
Add New Post /wp-admin/post-new.php1,562 ▲2023.26 ▲4.90607.37 ▲4.9048.83 ▼19.35
Media Library /wp-admin/upload.php1,427 ▲364.22 ▲0.0195.73 ▼6.1541.38 ▼0.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • cookiecode-plugin-options-version
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === cookiecode === )
The official readme.txt might help

cookiecode/cookiecode.php Passed 13 tests

This is the main PHP file of "CookieCode" version 2.4.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
Automatically block tracking and analytical cookies until the visitor gives their consent.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin330 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26692330

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods29
▷ Static methods13.45%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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 images were found in this plugin