66% wp-realiable-cookie-bar

Code Review | WP Reliable Cookie Bar

WordPress plugin WP Reliable Cookie Bar scored66%from 54 tests.

About plugin

  • Plugin page: wp-realiable-cook...
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Jun 24, 2020
  • Number of updates: 9
  • Update frequency: every 7.9 days
  • Top authors: utnalove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.00ms] Passed 4 tests

A check of server-side resources used by WP Reliable Cookie Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.49 ▼3.26
Dashboard /wp-admin3.32 ▼0.0248.55 ▼18.99
Posts /wp-admin/edit.php3.37 ▲0.0250.07 ▼1.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.65 ▼4.22
Media Library /wp-admin/upload.php3.24 ▲0.0140.04 ▲1.24
WP Reliable Cookie Bar /wp-admin/options-general.php?page=wprcb-settings3.1934.95

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Reliable Cookie Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.72 ▲0.372.05 ▲0.2343.56 ▼0.30
Dashboard /wp-admin2,202 ▲255.64 ▲0.0291.14 ▼16.6439.32 ▼12.40
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0440.39 ▼0.2038.63 ▲4.34
Add New Post /wp-admin/post-new.php1,541 ▲1523.21 ▼0.43661.72 ▲8.7959.19 ▲10.08
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.0294.53 ▼9.4739.99 ▼5.68
WP Reliable Cookie Bar /wp-admin/options-general.php?page=wprcb-settings9482.0025.7729.01

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wprcb-settings
    • > Notice in wp-content/plugins/wp-realiable-cookie-bar/admin.php+227
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-realiable-cookie-bar/wp-reliable-cookie-bar.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-realiable-cookie-bar/admin.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wprcb-settings
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wprcb-settings 144 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wprcb-settings
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wprcb-settings 145 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wprcb-settings
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wprcb-settings 155 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wprcb-settings
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wprcb-settings 156 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #1 is required in wp-realiable-cookie-bar/assets to your readme.txt
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

wp-realiable-cookie-bar/wp-reliable-cookie-bar.php 85% from 13 tests

Analyzing the main PHP file in "WP Reliable Cookie Bar" version 1.5
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-realiable-cookie-bar.php" instead of "wp-reliable-cookie-bar.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin349 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25314299
CSS11050

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/wp-reliable-cookie-bar-logo.png151.61KB65.41KB▼ 56.85%