62% the-ccpa-framework

Code Review | The CCPA Framework By Data443

WordPress plugin The CCPA Framework By Data443 scored62%from 54 tests.

About plugin

  • Plugin page: the-ccpa-framework
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2020
  • Latest release: Mar 30, 2023
  • Number of updates: 47
  • Update frequency: every 24.9 days
  • Top authors: data443 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,843 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.57MB] [CPU: ▲9.65ms] Passed 4 tests

Server-side resources used by The CCPA Framework By Data443
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9347.76 ▲4.24
Dashboard /wp-admin5.17 ▲1.8364.49 ▲15.64
Posts /wp-admin/edit.php5.23 ▲1.8364.20 ▲11.65
Add New Post /wp-admin/post-new.php7.70 ▲1.77103.94 ▲7.05
Media Library /wp-admin/upload.php5.04 ▲1.7755.72 ▲16.90
/wp-admin/index.php?page=ccpa-setup4.9044.86
Data443 CCPA /wp-admin/tools.php?page=ccpa_privacy5.1257.57
Privacy Tools /wp-admin/users.php?page=ccpa-profile5.0754.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 298 new files
Database: 2 new tables, 11 new options
New tables
wp_ccpa_consent
wp_ccpa_userlogs
New WordPress options
theysaidso_admin_options
ccpa_enable
db_upgraded
can_compress_scripts
ccpa_plugin_version
widget_recent-posts
wp_ccpa_consent_db_version
widget_recent-comments
widget_theysaidso_widget
wp_ccpa_userlogs_db_version
...

Browser metrics Passed 4 tests

A check of browser resources used by The CCPA Framework By Data443
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,044 ▲25813.58 ▼0.899.56 ▲7.7136.65 ▼5.87
Dashboard /wp-admin2,329 ▲1585.68 ▲0.0888.56 ▼31.0166.33 ▲25.85
Posts /wp-admin/edit.php2,246 ▲1432.11 ▲0.0937.29 ▼3.3434.83 ▼2.38
Add New Post /wp-admin/post-new.php1,661 ▲13523.61 ▲0.04731.26 ▲50.8247.20 ▼14.00
Media Library /wp-admin/upload.php1,540 ▲1404.22 ▼0.0095.85 ▼8.0177.24 ▲33.03
/wp-admin/index.php?page=ccpa-setup280.420.073.85
Data443 CCPA /wp-admin/tools.php?page=ccpa_privacy1,5882.8754.9043.84
Privacy Tools /wp-admin/users.php?page=ccpa-profile9812.0023.6030.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_ccpa_consent
    • wp_ccpa_userlogs
  • This plugin does not fully uninstall, leaving 11 options in the database
    • wp_ccpa_userlogs_db_version
    • ccpa_enable
    • ccpa_plugin_version
    • ccpa_enable_stylesheet
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 17× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/the-ccpa-framework/views/admin/modals/test.php
    • > /wp-content/plugins/the-ccpa-framework/views/installer/steps/integrations.php
    • > /wp-content/plugins/the-ccpa-framework/views/admin/general/name_from.php
    • > /wp-content/plugins/the-ccpa-framework/views/admin/privacy-policy/dpa.php
    • > /wp-content/plugins/the-ccpa-framework/views/installer/steps/welcome.php
    • > /wp-content/plugins/the-ccpa-framework/views/admin/cookie-popup/popup_background_color_picker.php
    • > /wp-content/plugins/the-ccpa-framework/views/admin/notices/footer.php
    • > /wp-content/plugins/the-ccpa-framework/views/policy/policy.php
    • > /wp-content/plugins/the-ccpa-framework/views/admin/privacy-policy/company-location.php
    • > /wp-content/plugins/the-ccpa-framework/views/global/country-options.php
  • 189× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/the-ccpa-framework/views/admin/general/unknown-user-message.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Data443\\CCPA\\Admin\\AdminNotice' not found in wp-content/plugins/the-ccpa-framework/src/Installer/AdminInstallerNotice.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Data443\\CCPA\\Admin\\AdminTab' not found in wp-content/plugins/the-ccpa-framework/src/Components/CookiePopup/AdminTabCookiePopup.php:7
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/the-ccpa-framework/views/admin/cookie-popup/enable_popup_allow_content.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Data443\\CCPA\\Admin\\AdminTab' not found in wp-content/plugins/the-ccpa-framework/src/Components/DoNotSell/AdminTabDoNotSell.php:7
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/the-ccpa-framework/views/admin/cookie-popup/enable_popup_dismiss_content.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/the-ccpa-framework/views/admin/privacy-policy/generated.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ccpa() in wp-content/plugins/the-ccpa-framework/views/admin/general/delete-action.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/the-ccpa-framework/views/admin/general/woo-disable_checkbox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/the-ccpa-framework/views/admin/notice.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/index.php?page=ccpa-setup
    • > Network (severe)
    wp-admin/index.php?page=ccpa-setup - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

the-ccpa-framework/the-ccpa-framework.php Passed 13 tests

The primary PHP file in "The CCPA Framework By Data443" version 2.0.2 is used by WordPress to initiate all plugin functionality
100 characters long description:
Tools to help make your website CCPA-compliant. Fully documented, extendable and developer-friendly.

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 detected35,545 lines of code in 248 files:
LanguageFilesBlank linesComment linesLines of code
PO File117,1549,86423,487
PHP2101,7801,9349,542
CSS8340141,813
JavaScript165684700
SVG3003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.36
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces27
Interfaces2
Traits0
Classes78
▷ Abstract classes45.13%
▷ Concrete classes7494.87%
▷ Final classes00.00%
Methods528
▷ Static methods00.00%
▷ Public methods45986.93%
▷ Protected methods6812.88%
▷ Private methods10.19%
Functions21
▷ Named functions1466.67%
▷ Anonymous functions733.33%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
29 PNG files occupy 0.79MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/3.png56.29KB18.59KB▼ 66.98%
assets/4.png46.55KB17.06KB▼ 63.36%
assets/3.png56.29KB18.59KB▼ 66.98%