83% online-results-cookie-manager

Code Review | Online-Results Cookie Manager

WordPress plugin Online-Results Cookie Manager scored83%from 54 tests.

About plugin

  • Plugin page: online-results-co...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 6, 2021
  • Latest release: Dec 13, 2021
  • Number of updates: 5
  • Update frequency: every 18.0 days
  • Top authors: onlineresults (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /448 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Online-Results Cookie Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.27 ▼1.57
Dashboard /wp-admin3.32 ▼0.0242.56 ▼17.48
Posts /wp-admin/edit.php3.37 ▲0.0248.31 ▼0.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.44 ▼13.26
Media Library /wp-admin/upload.php3.24 ▲0.0135.24 ▼2.64
Cookie Manager /wp-admin/options-general.php?page=oras3.2128.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
oras_option_name
widget_theysaidso_widget

Browser metrics Passed 4 tests

Online-Results Cookie Manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.48 ▲0.121.92 ▲0.2041.11 ▼2.28
Dashboard /wp-admin2,209 ▲215.83 ▼0.0599.41 ▼11.1340.82 ▼3.66
Posts /wp-admin/edit.php2,098 ▲92.04 ▼0.0139.17 ▼6.2134.69 ▼1.41
Add New Post /wp-admin/post-new.php1,533 ▲1123.16 ▲0.03657.58 ▲48.2461.14 ▲4.64
Media Library /wp-admin/upload.php1,388 ▲64.15 ▼0.1596.61 ▼2.1542.89 ▼0.19
Cookie Manager /wp-admin/options-general.php?page=oras7932.1927.4142.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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • oras_option_name
    • widget_recent-posts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/online-results-cookie-manager/oras-cookie-consent.php:30

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: cookies, manage cookies, easy cookie consent, gpdr, cookie consent

online-results-cookie-manager/oras-cookie-consent.php 77% from 13 tests

The main PHP script in "Online-Results Cookie Manager" version 1.1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("online-results-cookie-manager.php" instead of "oras-cookie-consent.php")
  • Description: The description should be shorter than 140 characters (currently 231 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected165 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10060
LESS113159
PHP1132246

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.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 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
oras-logo.png2.27KB1.42KB▼ 37.34%