77% auto-terms-of-service-and-privacy-policy

Code Review | WP AutoTerms: Privacy Policy Generator (GDPR & CCPA), Terms & Conditions Generator, Cookie Notice Banner

WordPress plugin WP AutoTerms: Privacy Policy Generator (GDPR & CCPA), Terms & Conditions Generator, Cookie Notice Banner scored77%from 54 tests.

About plugin

  • Plugin page: auto-terms-of-ser...
  • Plugin version: 2.5.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2012
  • Latest release: Nov 18, 2022
  • Number of updates: 126
  • Update frequency: every 29.5 days
  • Top authors: wpautoterms (65.87%)cliffpaulick (34.92%)

Code review

54 tests

User reviews

234 reviews

Install metrics

100,000+ active /2,841,364 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.39MB] [CPU: ▲7.43ms] Passed 4 tests

An overview of server-side resources used by WP AutoTerms: Privacy Policy Generator (GDPR & CCPA), Terms & Conditions Generator, Cookie Notice Banner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6443.65 ▲6.62
Dashboard /wp-admin4.95 ▲1.6459.10 ▲12.52
Posts /wp-admin/edit.php5.00 ▲1.6461.84 ▲3.31
Add New Post /wp-admin/post-new.php7.57 ▲1.68103.61 ▲7.25
Media Library /wp-admin/upload.php4.87 ▲1.6450.95 ▲17.59
Compliance Kits /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_compliancekits4.8544.53
Add Legal Pages /wp-admin/post-new.php?post_type=wpautoterms_page5.0971.64
Help /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_help4.8846.75
All Legal Pages /wp-admin/edit.php?post_type=wpautoterms_page4.9350.65
License /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_license_settings4.8844.70
/wp-admin/admin.php?page=wpautoterms_settings_advanced4.8842.77
Settings /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_settings4.8547.18

Server storage [IO: ▲11.18MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 448 new files
Database: no new tables, 55 new options
New WordPress options
theysaidso_admin_options
wpautoterms_update_notice_bar_position
wpautoterms_links_target_blank
wpautoterms_company_name
wpautoterms_update_notice_links_color
wpautoterms_activated
wpautoterms_cookies_notice_close_message
widget_theysaidso_widget
wpautoterms_state
wpautoterms_country
...

Browser metrics Passed 4 tests

A check of browser resources used by WP AutoTerms: Privacy Policy Generator (GDPR & CCPA), Terms & Conditions Generator, Cookie Notice Banner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲22714.14 ▼0.488.75 ▲6.8141.05 ▼2.96
Dashboard /wp-admin2,257 ▲665.12 ▼0.76103.33 ▼0.6680.02 ▲37.97
Posts /wp-admin/edit.php2,153 ▲642.51 ▲0.5036.45 ▼3.8336.92 ▼0.38
Add New Post /wp-admin/post-new.php1,558 ▲2517.62 ▼5.70697.28 ▲7.9237.17 ▼15.35
Media Library /wp-admin/upload.php1,439 ▲514.39 ▲0.18102.23 ▲2.2779.14 ▲35.31
Compliance Kits /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_compliancekits9531.9425.5932.09
Add Legal Pages /wp-admin/post-new.php?post_type=wpautoterms_page2,6148.12187.8293.97
Help /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_help1,3202.4541.4357.41
All Legal Pages /wp-admin/edit.php?post_type=wpautoterms_page1,2672.4833.8337.73
License /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_license_settings1,1502.1225.8930.96
/wp-admin/admin.php?page=wpautoterms_settings_advanced8631.9324.8927.03
Settings /wp-admin/edit.php?post_type=wpautoterms_page&page=wpautoterms_settings11,5062.1050.1032.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_wpautoterms_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 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
Almost there! Just fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/endorsements.php
    • > /wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legacy/coming-soon.php
    • > /wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/pages/help-q-a.php
    • > /wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legacy/shortcode-prologue.php
  • 36× 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_attr() in wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legal-pages/admin/submit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legacy/coming-soon-admin.php:1
    • > PHP Warning
      include_once(WPAUTOTERMS_PLUGIN_DIRdata/countries.php): failed to open stream: No such file or directory in wp-content/plugins/auto-terms-of-service-and-privacy-policy/includes/countries.php on line 7
    • > PHP Notice
      Undefined variable: atospp_pp_heading in wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legacy/tos-and-pp.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'wpautoterms\\Action_Base' not found in wp-content/plugins/auto-terms-of-service-and-privacy-policy/includes/admin/action/transfer-license.php:10
    • > PHP Notice
      Undefined variable: class_escaped in wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/cookies-notice.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'wpautoterms\\admin\\form\\Legal_Page' not found in wp-content/plugins/auto-terms-of-service-and-privacy-policy/includes/admin/form/licensed-legal-page.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'wpautoterms\\admin\\page\\Base' not found in wp-content/plugins/auto-terms-of-service-and-privacy-policy/includes/admin/page/help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legacy/privacy-policy.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/auto-terms-of-service-and-privacy-policy/templates/legacy/terms-of-service.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

auto-terms-of-service-and-privacy-policy/auto-terms-of-service-privacy-policy.php 77% from 13 tests

The entry point to "WP AutoTerms: Privacy Policy Generator (GDPR & CCPA), Terms & Conditions Generator, Cookie Notice Banner" version 2.5.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("auto-terms-of-service-and-privacy-policy.php" instead of "auto-terms-of-service-privacy-policy.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin350,342 lines of code in 402 files:
LanguageFilesBlank linesComment linesLines of code
PHP2611,320557197,161
JavaScript1201,3571,173149,476
CSS16200891,889
JSON2001,719
Python1241994
Bourne Shell1002
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.53
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces14
Interfaces1
Traits0
Classes87
▷ Abstract classes2225.29%
▷ Concrete classes6574.71%
▷ Final classes00.00%
Methods400
▷ Static methods12230.50%
▷ Public methods31077.50%
▷ Protected methods9022.50%
▷ Private methods00.00%
Functions133
▷ Named functions11485.71%
▷ Anonymous functions1914.29%
Constants165
▷ Global constants159.09%
▷ Class constants15090.91%
▷ Public constants150100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 compressed PNG files occupy 0.39MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png51.57KB56.26KB0.00%
screenshot-2.png51.57KB56.26KB0.00%
banner-1544x500.png54.50KB58.67KB0.00%
images/icon.png0.26KB0.29KB0.00%
screenshot-5.png52.19KB56.76KB0.00%