84% cookie-message

Code Review | Cookie Message

WordPress plugin Cookie Message scored84%from 54 tests.

About plugin

  • Plugin page: cookie-message
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: Feb 5, 2015
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: Jenst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,891 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.76ms] Passed 4 tests

This is a short check of server-side resources used by Cookie Message
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.1944.30 ▲0.84
Dashboard /wp-admin3.79 ▲0.1652.60 ▼15.20
Posts /wp-admin/edit.php3.84 ▲0.1655.78 ▲0.58
Add New Post /wp-admin/post-new.php6.31 ▲0.1696.56 ▼13.24
Media Library /wp-admin/upload.php3.65 ▲0.1639.76 ▲1.11
Cookie Message /wp-admin/options-general.php?page=cookie-message3.7746.35

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cookie Message
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.84 ▼0.3511.73 ▲9.8342.50 ▼2.07
Dashboard /wp-admin2,199 ▲195.65 ▲0.0594.60 ▲7.1938.48 ▼1.32
Posts /wp-admin/edit.php2,107 ▲42.00 ▼0.0640.26 ▲0.5234.34 ▼2.51
Add New Post /wp-admin/post-new.php1,562 ▲1718.23 ▼4.98638.88 ▼56.4167.06 ▲17.98
Media Library /wp-admin/upload.php1,398 ▼54.26 ▲0.06100.42 ▼3.4141.52 ▼6.19
Cookie Message /wp-admin/options-general.php?page=cookie-message1,9547.29160.8457.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cookie-message/register-settings-api.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cookie-message/register-settings-api.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cookie-message/settings-array.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: message, notice, cookies, cookie

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

"Cookie Message" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
37 characters long description:
Add a cookie message to your website.

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 plugin1,080 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP362208852
Sass1210131
JavaScript213178
CSS10019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity87.50
▷ Minimum class complexity28.00
▷ Maximum class complexity147.00
Average method complexity5.22
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin