84% terms-of-service-and-privacy-policy

Code Review | Terms of Service & Privacy Policy Generator

WordPress plugin Terms of Service & Privacy Policy Generator scored84%from 54 tests.

About plugin

  • Plugin page: terms-of-service-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Dec 1, 2015
  • Latest release: Dec 2, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Wishloop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /19,814 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Terms of Service & Privacy Policy Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0051.39 ▲9.39
Dashboard /wp-admin3.64 ▲0.3454.70 ▲4.86
Posts /wp-admin/edit.php3.37 ▲0.0147.48 ▼5.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.11 ▼9.49
Media Library /wp-admin/upload.php3.24 ▲0.0136.18 ▼1.55
TOS Generator /wp-admin/options-general.php?page=wl_tos-wp3.2135.25

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Terms of Service & Privacy Policy Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲11314.36 ▲0.011.75 ▼0.3746.04 ▼1.50
Dashboard /wp-admin2,305 ▲1255.64 ▼0.0294.59 ▲2.5448.29 ▲9.45
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0235.70 ▼2.7936.56 ▲1.29
Add New Post /wp-admin/post-new.php1,529 ▼823.19 ▲5.11659.08 ▲7.7856.34 ▼7.79
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.0796.04 ▼9.8543.71 ▼4.33
TOS Generator /wp-admin/options-general.php?page=wl_tos-wp1,0952.0026.0726.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.04MB] 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
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/terms-of-service-and-privacy-policy/wl_tos_pp_generator.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === terms-of-service-and-privacy-policy === )
Please take inspiration from this readme.txt

terms-of-service-and-privacy-policy/wl_tos_pp_generator.php 92% from 13 tests

The main PHP file in "Terms of Service & Privacy Policy Generator" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("terms-of-service-and-privacy-policy.php" instead of "wl_tos_pp_generator.php")

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 plugin476 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17039476

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin