90% xcoobee-cookie

Code Review | XcooBee GDPR Cookie Manager

WordPress plugin XcooBee GDPR Cookie Manager scored90%from 54 tests.

About plugin

  • Plugin page: xcoobee-cookie
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Feb 26, 2020
  • Number of updates: 21
  • Update frequency: every 19.4 days
  • Top authors: xcoobee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,222 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.04ms] Passed 4 tests

Server-side resources used by XcooBee GDPR Cookie Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.12 ▼2.08
Dashboard /wp-admin3.31 ▲0.0146.21 ▼1.25
Posts /wp-admin/edit.php3.36 ▲0.0144.56 ▼1.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.78 ▼9.51
Media Library /wp-admin/upload.php3.23 ▲0.0134.95 ▼3.31

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by XcooBee GDPR Cookie Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.23 ▼0.421.98 ▲0.4137.97 ▼6.22
Dashboard /wp-admin2,202 ▲255.48 ▼0.1382.33 ▼0.7439.13 ▼2.46
Posts /wp-admin/edit.php2,107 ▲102.00 ▲0.0444.21 ▲9.9538.77 ▲4.29
Add New Post /wp-admin/post-new.php1,538 ▲1223.00 ▲0.02682.91 ▲5.9053.99 ▼3.84
Media Library /wp-admin/upload.php1,410 ▲74.18 ▼0.05104.56 ▼8.4449.76 ▼1.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: security, privacy, xcoobee, gdpr, cookie...

xcoobee-cookie/xcoobee-cookie.php 92% from 13 tests

The main PHP file in "XcooBee GDPR Cookie Manager" ver. 1.3.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,326 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP81333441,005
JavaScript47045272
CSS20049

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity18.00
▷ Minimum class complexity9.00
▷ Maximum class complexity27.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2583.33%
▷ Protected methods26.67%
▷ Private methods310.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants3
▷ Global constants3100.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
No PNG files were detected