79% cookie-script-com

Code Review | Cookie-Script.com

WordPress plugin Cookie-Script.com scored79%from 54 tests.

About plugin

  • Plugin page: cookie-script-com
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.2
  • WordPress version: 6.3.1
  • First release: Aug 28, 2018
  • Latest release: Apr 18, 2023
  • Number of updates: 48
  • Update frequency: every 35.3 days
  • Top authors: cookiescriptcom (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

6,000+ active /24,221 total downloads


Plugin footprint 65% 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.05MB] [CPU: ▼13.89ms] Passed 4 tests

A check of server-side resources used by Cookie-Script.com
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0224.18 ▼15.56
Dashboard /wp-admin3.38 ▲0.0842.68 ▼10.72
Posts /wp-admin/edit.php3.43 ▲0.0751.90 ▲5.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.00 ▼31.61
Media Library /wp-admin/upload.php3.30 ▲0.0736.55 ▲2.33
Cookie-Script.com /wp-admin/options-general.php?page=cookie-script3.2731.15

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Cookie-Script.com
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.28 ▼0.282.00 ▲0.2437.09 ▼6.64
Dashboard /wp-admin2,204 ▲305.65 ▼0.0295.62 ▲6.6545.78 ▲0.52
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0342.63 ▲5.5534.67 ▼0.51
Add New Post /wp-admin/post-new.php1,531 ▲523.18 ▼0.45675.70 ▲58.7052.66 ▲3.39
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.1098.00 ▼7.2540.90 ▼2.69
Cookie-Script.com /wp-admin/options-general.php?page=cookie-script9592.1428.5951.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method CookieScript::cookie_script_deactivation() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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 errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires php: Invalid plugin version format
The official readme.txt might help

cookie-script-com/cookie-script.php 85% from 13 tests

The principal PHP file in "Cookie-Script.com" v. 0.7 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("cookie-script-com.php" instead of "cookie-script.php")

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
There were no executable files found in this plugin820 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File24462168

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
PNG images were not found in this plugin