68% legal-pages

Code Review | Legal Pages – Privacy Policy, Terms & Conditions, GDPR, CCPA, and Cookie Notice Generator

WordPress plugin Legal Pages – Privacy Policy, Terms & Conditions, GDPR, CCPA, and Cookie Notice Generator scored 68% from 54 tests.

About plugin

  • Plugin page: legal-pages
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 11, 2017
  • Latest release: Sep 18, 2023
  • Number of updates: 41
  • Update frequency: every 59.5 days
  • Top authors: armanul94 (48.78%)AdlPlugins (39.02%)aazztech (17.07%)

Code review

54 tests

User reviews

28 reviews

Install metrics

10,000+ active / 128,622 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼1.09ms] Passed 4 tests

A check of server-side resources used by Legal Pages – Privacy Policy, Terms & Conditions, GDPR, CCPA, and Cookie Notice Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4338.14 ▼3.35
Dashboard /wp-admin3.73 ▲0.4354.27 ▲4.36
Posts /wp-admin/edit.php3.78 ▲0.4354.15 ▲1.39
Add New Post /wp-admin/post-new.php6.25 ▲0.3691.59 ▼6.76
Media Library /wp-admin/upload.php3.59 ▲0.3640.97 ▲5.16
Add New Legal Page /wp-admin/admin.php?page=createLegalPage3.7240.70
Upgrade to Pro /wp-admin/admin.php?page=adl-lp-upgrade3.5936.71
Help & Support /wp-admin/admin.php?page=legal-page-support3.5937.81
Legal Page Templates /wp-admin/admin.php?page=legal-page-template3.6740.95
All Legal Pages /wp-admin/admin.php?page=all-legal-Pages3.6139.69
Settings /wp-admin/admin.php?page=adl-legal-pages3.6840.05

Server storage [IO: ▲0.61MB] [DB: ▲0.04MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 45 new files
Database: 1 new table, 13 new options
New tables
wp_adl_lp_templates
New WordPress options
adl_lp_excludePage
adl_demo_inserted
adl_lp_general
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
adl_lp_social
adl_lp_misc
db_upgraded
adl_lp_accept_term
...

Browser metrics Passed 4 tests

Legal Pages – Privacy Policy, Terms & Conditions, GDPR, CCPA, and Cookie Notice Generator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲12113.29 ▼1.381.58 ▼0.2537.20 ▼16.23
Dashboard /wp-admin2,257 ▲665.86 ▲0.01109.79 ▲6.8889.03 ▲43.05
Posts /wp-admin/edit.php2,131 ▲421.99 ▲0.0333.73 ▼7.7635.34 ▼4.97
Add New Post /wp-admin/post-new.php1,562 ▲2923.25 ▲0.03680.81 ▼13.6957.22 ▲2.82
Media Library /wp-admin/upload.php1,430 ▲424.13 ▼0.03108.68 ▲0.0642.90 ▼2.77
Add New Legal Page /wp-admin/admin.php?page=createLegalPage1,7527.00135.8866.15
Upgrade to Pro /wp-admin/admin.php?page=adl-lp-upgrade1,0543.3045.0960.07
Help & Support /wp-admin/admin.php?page=legal-page-support1,0253.2440.1527.75
Legal Page Templates /wp-admin/admin.php?page=legal-page-template1,9933.7050.9234.77
All Legal Pages /wp-admin/admin.php?page=all-legal-Pages1,0463.3339.7433.42
Settings /wp-admin/admin.php?page=adl-legal-pages1,0313.3738.5938.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_adl_lp_templates
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_recent-posts
    • widget_recent-comments
    • adl_lp_excludePage
    • adl_lp_misc
    • widget_theysaidso_widget
    • adl_lp_social
    • theysaidso_admin_options
    • adl_lp_accept_term
    • adl_demo_inserted
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/legal-pages/includes/classes/ADL_LP_general.php
    • > /wp-content/plugins/legal-pages/views/disclaimer.php
    • > /wp-content/plugins/legal-pages/views/support.php
    • > /wp-content/plugins/legal-pages/includes/classes/ADL_LP_database.php
    • > /wp-content/plugins/legal-pages/config.php
    • > /wp-content/plugins/legal-pages/views/upgrade-template-lists.php
    • > /wp-content/plugins/legal-pages/main.php
    • > /wp-content/plugins/legal-pages/includes/classes/ADL_LP_helper.php
    • > /wp-content/plugins/legal-pages/includes/classes/ADL_LP_ajax_handler.php
    • > /wp-content/plugins/legal-pages/adl-legal-pages.php
  • 48× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 57
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 69
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 75
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-features.php on line 7
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 27
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 42
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 48
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 90
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-features.php on line 11
    • > PHP Warning
      Use of undefined constant WPLP_URL - assumed 'WPLP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-pages/views/upgrade-template-lists.php on line 51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

legal-pages/adl-legal-pages.php 85% from 13 tests

Analyzing the main PHP file in "Legal Pages – Privacy Policy, Terms & Conditions, GDPR, CCPA, and Cookie Notice Generator" version 1.3.8
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("legal-pages.php" instead of "adl-legal-pages.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 259 characters long)

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
Success! There were no dangerous files found in this plugin4,973 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP247017942,964
CSS5194751,164
JavaScript28660297
SVG100288
HTML5190260

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.50
▷ Minimum class complexity6.00
▷ Maximum class complexity76.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods151
▷ Static methods10.66%
▷ Public methods11676.82%
▷ Protected methods63.97%
▷ Private methods2919.21%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1392.86%
▷ Class constants17.14%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/premium.png2.46KB1.48KB▼ 40.03%
admin/assets/img/check.png0.49KB0.32KB▼ 35.00%