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: 6.3.1
  • 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

600+ active / 31,752 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.90MB] [CPU: ▼32.88ms] Passed 4 tests

A check of server-side resources used by AdSense Privacy Policy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.57 ▼1.49
Dashboard /wp-admin3.04 ▼0.2623.13 ▼26.20
Posts /wp-admin/edit.php3.04 ▼0.3122.85 ▼25.35
Add New Post /wp-admin/post-new.php3.04 ▼2.8422.57 ▼72.02
Media Library /wp-admin/upload.php3.04 ▼0.1925.36 ▼7.95

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 17 new options
New WordPress options
privacy_policy_credit
privacy_policy_before_paragraph
widget_recent-comments
privacy_policy_sitename
privacy_policy_pp_help
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
privacy_policy_before_heading
privacy_policy_after_paragraph
...

Browser metrics Passed 4 tests

A check of browser resources used by AdSense Privacy Policy
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.48 ▲0.101.95 ▲0.0543.27 ▼0.39
Dashboard /wp-admin2,210 ▲395.86 ▼0.04110.20 ▼1.7738.86 ▼7.71
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0140.32 ▲3.1435.31 ▲2.46
Add New Post /wp-admin/post-new.php1,536 ▲2223.33 ▲5.85634.43 ▼42.5043.57 ▼1.12
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0393.62 ▼10.3340.23 ▼5.19
Adsense Privacy Policy /wp-admin/privacy-policy.php260.440.0914.00

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
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 17 options in the database
    • privacy_policy_title
    • widget_theysaidso_widget
    • privacy_policy_after_paragraph
    • privacy_policy_browser_help
    • widget_recent-comments
    • privacy_policy_before_heading
    • db_upgraded
    • privacy_policy_before_paragraph
    • privacy_policy_pp_help
    • privacy_policy_slug
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 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 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > 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)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === adsense-privacy-policy === )
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "AdSense Privacy Policy" version 1.1.1
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file 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 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected294 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19523294

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
There are no PNG files in this plugin