84% zedna-cookies-bar

Code Review | Zedna Cookies Bar

WordPress plugin Zedna Cookies Bar scored84%from 54 tests.

About plugin

  • Plugin page: zedna-cookies-bar
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2020
  • Latest release: Jul 9, 2020
  • Number of updates: 14
  • Update frequency: every 8.6 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.10ms] Passed 4 tests

Server-side resources used by Zedna Cookies Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.00 ▼2.93
Dashboard /wp-admin3.37 ▲0.0744.49 ▼6.07
Posts /wp-admin/edit.php3.42 ▲0.0644.57 ▼1.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.01 ▼6.26
Media Library /wp-admin/upload.php3.29 ▲0.0635.00 ▲4.42
Zedna Cookies Bar /wp-admin/options-general.php?page=zedna-cookies-bar-settings3.2645.40

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Zedna Cookies Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8613.64 ▼0.642.23 ▼0.2442.66 ▼9.91
Dashboard /wp-admin2,229 ▲415.97 ▲1.0598.29 ▼6.8537.06 ▼6.16
Posts /wp-admin/edit.php2,117 ▲312.28 ▲0.2741.04 ▲1.3334.14 ▼3.82
Add New Post /wp-admin/post-new.php1,379 ▼16319.57 ▲1.22523.07 ▼86.3028.36 ▼27.83
Media Library /wp-admin/upload.php1,414 ▲264.44 ▲0.2397.69 ▲1.7940.95 ▲0.63
Zedna Cookies Bar /wp-admin/options-general.php?page=zedna-cookies-bar-settings1,6833.0869.5534.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=zedna-cookies-bar-settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/zedna-cookies-bar/js/zedna-cookies-bar.js?ver=6.3.1 2:46 Uncaught TypeError: Cannot read properties of null (reading 'style')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

zedna-cookies-bar/zedna-cookies-bar.php 92% from 13 tests

The main PHP file in "Zedna Cookies Bar" ver. 1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin321 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1913232
CSS15051
JavaScript10032
XML1006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
There are no PNG files in this plugin