74% rebel-cookies-notification

Code Review | Rebel Cookies Notification

WordPress plugin Rebel Cookies Notification scored74%from 54 tests.

About plugin

  • Plugin page: rebel-cookies-not...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2014
  • Latest release: Mar 1, 2015
  • Number of updates: 40
  • Update frequency: every 6.2 days
  • Top authors: anthony-b (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,019 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.97MB] [CPU: ▼52.92ms] Passed 4 tests

An overview of server-side resources used by Rebel Cookies Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.65 ▼33.85
Dashboard /wp-admin2.05 ▼1.306.57 ▼54.24
Posts /wp-admin/edit.php2.05 ▼1.315.52 ▼37.04
Add New Post /wp-admin/post-new.php2.05 ▼3.845.61 ▼86.53
Media Library /wp-admin/upload.php2.05 ▼1.187.43 ▼24.03

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Rebel Cookies Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.39 ▼0.802.12 ▲0.5144.72 ▲1.11
Dashboard /wp-admin2,227 ▲394.89 ▼0.25100.16 ▼22.3178.48 ▲33.06
Posts /wp-admin/edit.php2,110 ▲242.01 ▼0.0236.14 ▼0.5631.87 ▼2.82
Add New Post /wp-admin/post-new.php1,695 ▲18124.78 ▲7.19637.80 ▼45.9828.98 ▼37.91
Media Library /wp-admin/upload.php1,406 ▲214.22 ▲0.0595.42 ▼6.9165.44 ▲20.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery_cookies_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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 following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/rebel-cookies-notification/options-page-wrapper.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rebel-cookies-notification/rebel-cookies-notification.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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 to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === rebel-cookies-notification === )
The official readme.txt might help

rebel-cookies-notification/rebel-cookies-notification.php Passed 13 tests

"Rebel Cookies Notification" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
93 characters long description:
This plugin was created by Rebel to notify users that cookies are being set but not mis-used.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected267 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2282195
CSS120192
PHP2323080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions6
▷ Named functions6100.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
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/close_light-theme.png3.05KB0.34KB▼ 88.70%
img/rebel_logo.png16.42KB7.55KB▼ 54.03%
img/rebel_logo_icon_big.png1.59KB1.50KB▼ 5.11%
img/rebel_logo_icon.png0.59KB0.53KB▼ 10.58%
img/close.png3.04KB0.34KB▼ 88.64%