68% adsense-privacy-policy

Code Review | AdSense Privacy Policy

WordPress plugin AdSense Privacy Policy scored 68% from 54 tests.

About plugin

  • Plugin page: adsense-privacy-p...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.4.2
  • WordPress version: 5.9.2
  • First release: Dec 3, 2012
  • Latest release: Dec 23, 2012
  • Number of updates: 16
  • Update frequency: every 2.1 days
  • Top authors: hotvanrod (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 31,252 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼342.07ms] Passed 4 tests

This is a short check of server-side resources used by AdSense Privacy Policy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0561.16 ▲5.69
Dashboard /wp-admin3.14 ▼0.2719.12 ▼53.92
Posts /wp-admin/edit.php3.14 ▼0.5018.03 ▼46.80
Add New Post /wp-admin/post-new.php3.14 ▼3.8318.13 ▼1,256.67
Media Library /wp-admin/upload.php3.14 ▼0.1619.59 ▼10.89

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 11 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by AdSense Privacy Policy
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲2416.13 ▲0.395.89 ▲0.072.50 ▲0.39
Dashboard /wp-admin2,893 ▲356.15 ▼0.04128.02 ▼21.17226.22 ▲56.27
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0274.11 ▲7.68149.56 ▲2.61
Add New Post /wp-admin/post-new.php1,755 ▲9420.83 ▲4.91455.13 ▲25.88170.37 ▲17.23
Media Library /wp-admin/upload.php1,706 ▲85.47 ▼0.05194.69 ▲52.73183.85 ▼0.96
Adsense Privacy Policy /wp-admin/privacy-policy.php260.940.0323.83

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
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5600
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 11 options in the database
    • privacy_policy_after_paragraph
    • privacy_policy_title
    • privacy_policy_before_paragraph
    • privacy_policy_before_heading
    • privacy_policy_pp_help
    • privacy_policy_contact
    • privacy_policy_credit
    • privacy_policy_after_heading
    • privacy_policy_slug
    • privacy_policy_sitename
    • ...

Smoke tests 50% 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 50% 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/adsense-privacy-policy/privacy-policy.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/privacy-policy.php
    • > Network (severe)
    wp-admin/privacy-policy.php - Failed to load resource: the server responded with a status of 404 (Not Found)


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === adsense-privacy-policy === )
You can look at the official readme.txt

adsense-privacy-policy/privacy-policy.php 92% from 13 tests

This is the main PHP file of "AdSense Privacy Policy" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("adsense-privacy-policy.php" instead of "privacy-policy.php")

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
There were no executable files found in this plugin294 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin