79% super-simple-cookie-bar

Code Review | Super Simple Cookie Bar

WordPress plugin Super Simple Cookie Bar scored79%from 54 tests.

About plugin

  • Plugin page: super-simple-cook...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: Nov 17, 2022
  • Number of updates: 4
  • Update frequency: every 25.0 days
  • Top authors: ncompass (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /755 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.08MB] [CPU: ▼7.73ms] Passed 4 tests

An overview of server-side resources used by Super Simple Cookie Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.00 ▼1.80
Dashboard /wp-admin3.40 ▲0.0545.85 ▼14.80
Posts /wp-admin/edit.php3.51 ▲0.1646.25 ▲2.46
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.90 ▼16.76
Media Library /wp-admin/upload.php3.32 ▲0.0937.48 ▲4.67
Super Simple Cookie Bar /wp-admin/options-general.php?page=super-simple-cookie-bar3.2627.80

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Super Simple Cookie Bar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.59 ▼0.961.62 ▼0.1937.10 ▼3.29
Dashboard /wp-admin2,210 ▲224.84 ▼0.07113.00 ▲14.1543.39 ▼1.35
Posts /wp-admin/edit.php2,090 ▼22.04 ▲0.0035.89 ▲0.7031.74 ▼8.40
Add New Post /wp-admin/post-new.php1,536 ▼722.85 ▲4.58695.31 ▲54.3852.91 ▼7.46
Media Library /wp-admin/upload.php1,395 ▲104.20 ▼0.0697.70 ▼4.8846.20 ▼0.72
Super Simple Cookie Bar /wp-admin/options-general.php?page=super-simple-cookie-bar9452.0323.3727.32

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=super-simple-cookie-bar
    • > Notice in wp-content/plugins/super-simple-cookie-bar/includes/sscb-settings.php+271
    Trying to access array offset on value of type bool

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-simple-cookie-bar/includes/sscb-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-simple-cookie-bar/includes/sscb-settings.php:14

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: cookie notice, cookie bar, cookie consent, super simple cookie bar, simple cookie bar...

super-simple-cookie-bar/super-simple-cookie-bar.php Passed 13 tests

The principal PHP file in "Super Simple Cookie Bar" v. 1.0.1 is loaded by WordPress automatically on each request
69 characters long description:
A super simple plugin that provides a super simple cookie bar notice.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected323 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP375288271
Markdown112045
CSS1006
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.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
No PNG files were detected