83% cookiepro-ccpa

Code Review | CCPA Opt-Out by CookiePro

WordPress plugin CCPA Opt-Out by CookiePro scored83%from 54 tests.

About plugin

  • Plugin page: cookiepro-ccpa
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2019
  • Latest release: Oct 12, 2021
  • Number of updates: 18
  • Update frequency: every 40.8 days
  • Top authors: cookiepro (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /7,306 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.37ms] Passed 4 tests

A check of server-side resources used by CCPA Opt-Out by CookiePro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.00 ▲0.63
Dashboard /wp-admin3.40 ▲0.1047.73 ▼5.75
Posts /wp-admin/edit.php3.51 ▲0.1648.43 ▲1.95
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.82 ▼14.25
Media Library /wp-admin/upload.php3.32 ▲0.0935.07 ▼2.09

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

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

Browser metrics Passed 4 tests

CCPA Opt-Out by CookiePro: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17713.74 ▼0.8915.67 ▲13.8739.93 ▲1.54
Dashboard /wp-admin2,207 ▲275.57 ▼0.0987.34 ▲0.1536.82 ▼4.03
Posts /wp-admin/edit.php2,115 ▲181.98 ▼0.0238.26 ▲2.0935.85 ▼1.11
Add New Post /wp-admin/post-new.php1,547 ▲2118.36 ▼5.01612.23 ▼73.4972.16 ▲16.55
Media Library /wp-admin/upload.php1,412 ▲154.26 ▲0.0891.65 ▼7.5943.39 ▼3.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cookiepro-ccpa/views/ot-body.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cookiepro-ccpa/views/ot-body-logo-settings.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cookiepro-ccpa/views/ot-body-google-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/cookiepro-ccpa/views/ot-header.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/cookiepro-ccpa/views/ot-publish-footer.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cookiepro-ccpa/views/ot-floating-button.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cookiepro-ccpa/views/ot-publish-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cookiepro-ccpa/views/ot-privacy-policy.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cookiepro-ccpa/views/ot-publish.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/cookiepro-ccpa/views/ot-body-footer-settings.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
The official readme.txt might help

cookiepro-ccpa/class-cookieproccpa.php 85% from 13 tests

The main PHP script in "CCPA Opt-Out by CookiePro" version 1.0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cookiepro-ccpa.php" instead of "class-cookieproccpa.php")
  • Description: The description should be shorter than 140 characters (currently 234 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,713 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP27922541,221
JavaScript11412187
SVG909155
CSS158150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
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
assets/images/icon.png2.85KB2.18KB▼ 23.47%