83% simple-cookie-law

Code Review | Simple Cookie Law

WordPress plugin Simple Cookie Law scored83%from 54 tests.

About plugin

  • Plugin page: simple-cookie-law
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Aug 24, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: snagysandor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,413 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.39ms] Passed 4 tests

Analyzing server-side resources used by Simple Cookie Law
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.98 ▼0.99
Dashboard /wp-admin3.32 ▲0.0247.13 ▼2.74
Posts /wp-admin/edit.php3.37 ▲0.0250.49 ▲3.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.50 ▼12.57
Media Library /wp-admin/upload.php3.25 ▲0.0241.36 ▲2.76
Simple Cookie Law /wp-admin/options-general.php?page=simple_cookie_law3.2130.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
simple_cookie_law_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Cookie Law
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲5513.61 ▼0.342.38 ▲0.4844.58 ▼1.15
Dashboard /wp-admin2,215 ▲244.92 ▲0.01111.27 ▲1.8242.71 ▼4.45
Posts /wp-admin/edit.php2,101 ▲122.09 ▲0.0943.47 ▲5.7334.02 ▼3.70
Add New Post /wp-admin/post-new.php1,521 ▲123.16 ▲0.19677.42 ▲22.8072.26 ▲19.96
Media Library /wp-admin/upload.php1,400 ▲94.26 ▲0.0699.55 ▲0.0845.97 ▲2.01
Simple Cookie Law /wp-admin/options-general.php?page=simple_cookie_law1,2432.4844.4531.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • simple_cookie_law_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-cookie-law/simple-cookie-law.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Contributors: The plugin tags were not defined
  • Contributors: Plugin contributors not specified
The official readme.txt might help

simple-cookie-law/simple-cookie-law.php 92% from 13 tests

This is the main PHP file of "Simple Cookie Law" version 0.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

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
There were no executable files found in this plugin357 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11119224
JavaScript10322491
PO File1141641
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin