89% cookie-script-com

Code Review | Cookie-Script.com

WordPress plugin Cookie-Script.com scored 89% from 54 tests.

About plugin

  • Plugin page: cookie-script-com
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.8
  • WordPress version: 5.8.1
  • First release: Aug 28, 2018
  • Latest release: Oct 3, 2021
  • Number of updates: 40
  • Update frequency: every 28.3 days
  • Top authors: cookiescriptcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 6,476 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.04MB] [CPU: ▼145.88ms] Passed 4 tests

A check of server-side resources used by Cookie-Script.com
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0435.64 ▲0.29
Dashboard /wp-admin3.10 ▲0.0549.11 ▼4.28
Posts /wp-admin/edit.php3.16 ▲0.0545.68 ▼4.60
Add New Post /wp-admin/post-new.php5.46 ▲0.0395.48 ▼568.96
Media Library /wp-admin/upload.php3.05 ▲0.0527.12 ▼5.66
Cookie-Script.com /wp-admin/options-general.php?page=cookie-script3.0230.78

Server storage [IO: ▲0.08MB] [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, no new 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 /3,735 ▲16315.89 ▲0.2210.72 ▼1.0547.73 ▼0.03
Dashboard /wp-admin2,980 ▲436.15 ▲0.17140.16 ▼13.06106.76 ▼8.88
Posts /wp-admin/edit.php2,746 ▲72.71 ▼0.0073.20 ▲10.3690.91 ▼2.90
Add New Post /wp-admin/post-new.php1,688 ▲18818.79 ▲0.23404.04 ▲2.70111.47 ▼6.98
Media Library /wp-admin/upload.php1,814 ▲45.05 ▲0.02158.33 ▼10.74121.59 ▼0.78
Cookie-Script.com /wp-admin/options-general.php?page=cookie-script1,1472.0958.5492.24

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method CookieScript::cookie_script_deactivation() should not be called statically

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

Optimizations

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.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cookie-script-com.php" instead of "cookie-script.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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 plugin665 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP25124214
CSS2342168
PO File24462168
JavaScript216866
SVG10049

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.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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