84% simple-cookies-notice

Code Review | Simple cookies notice

WordPress plugin Simple cookies notice scored84%from 54 tests.

About plugin

  • Plugin page: simple-cookies-no...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2019
  • Latest release: Apr 12, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wpexpertgr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Simple cookies notice
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.26 ▼3.70
Dashboard /wp-admin3.33 ▲0.0345.59 ▼6.38
Posts /wp-admin/edit.php3.38 ▲0.0349.31 ▲1.91
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.74 ▼7.84
Media Library /wp-admin/upload.php3.25 ▲0.0333.62 ▼3.65
Simple cookies notice /wp-admin/options-general.php?page=simple-cookies-notice3.2835.89

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple cookies notice
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20013.51 ▼0.896.27 ▲4.3753.87 ▲10.83
Dashboard /wp-admin2,215 ▲244.80 ▼0.08108.03 ▼8.6637.87 ▼7.35
Posts /wp-admin/edit.php2,098 ▲91.99 ▼0.0138.01 ▲0.4536.01 ▲2.45
Add New Post /wp-admin/post-new.php1,519 ▼1417.68 ▼5.25600.48 ▼44.1350.72 ▲1.03
Media Library /wp-admin/upload.php1,394 ▲64.21 ▼0.0194.34 ▼8.8340.54 ▼2.43
Simple cookies notice /wp-admin/options-general.php?page=simple-cookies-notice1,4886.74130.7860.80

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-cookies-notice/simple-cookies-notice.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

simple-cookies-notice/simple-cookies-notice.php Passed 13 tests

The principal PHP file in "Simple cookies notice" v. 1.0.0 is loaded by WordPress automatically on each request
90 characters long description:
Just a simple popup fixed at bottom of the screen. You can use it for your cookies notice.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected134 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2243080
CSS27045
JavaScript1009

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.09
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/black-close-16.png0.21KB0.21KB0.00%