10% third-party-cookie-eraser

Code Review | Third Party Cookie Eraser

WordPress plugin Third Party Cookie Eraser scored10%from 54 tests.

About plugin

  • Plugin page: third-party-cooki...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.2.2
  • WordPress version: 6.3.1
  • First release: May 23, 2015
  • Latest release: May 26, 2015
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: andreapernici (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,716 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/third-party-cookie-eraser/third-party-cookie-eraser.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; AndreaThirdPartyCookieEraser has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.84ms] Passed 4 tests

This is a short check of server-side resources used by Third Party Cookie Eraser
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.19 ▼37.45
Dashboard /wp-admin2.11 ▼1.196.43 ▼45.16
Posts /wp-admin/edit.php2.11 ▼1.255.91 ▼50.49
Add New Post /wp-admin/post-new.php2.11 ▼3.786.16 ▼86.26
Media Library /wp-admin/upload.php2.11 ▼1.126.05 ▼26.92
Third Party Cookie Eraser /wp-admin/options-general.php?page=third-party-cookie-eraser2.115.85

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Third Party Cookie Eraser: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.57 ▼0.791.68 ▼0.2442.44 ▼0.14
Dashboard /wp-admin2,210 ▲184.85 ▼0.09111.38 ▼11.8041.05 ▼2.39
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0737.17 ▼0.5830.90 ▼4.08
Add New Post /wp-admin/post-new.php1,545 ▲1218.48 ▼4.38635.81 ▼58.1849.62 ▼8.72
Media Library /wp-admin/upload.php1,386 ▼24.23 ▲0.0392.02 ▼7.0241.14 ▼2.03
Third Party Cookie Eraser /wp-admin/options-general.php?page=third-party-cookie-eraser8342.0325.1628.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/third-party-cookie-eraser/third-party-cookie-eraser.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; AndreaThirdPartyCookieEraser has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=third-party-cookie-eraser
    • > Deprecated in wp-content/plugins/third-party-cookie-eraser/third-party-cookie-eraser.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; AndreaThirdPartyCookieEraser has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=third-party-cookie-eraser
    • > Notice in wp-content/plugins/third-party-cookie-eraser/third-party-cookie-eraser.php+60
    Undefined offset: 0

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/third-party-cookie-eraser/third-party-cookie-eraser.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=third-party-cookie-eraser
    • > Network (severe)
    https://www.wemakefuture.it/images/kit-stampa/300x250.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (The Cookie Law is one of the most stupid law in the world.)
The official readme.txt is a good inspiration

third-party-cookie-eraser/third-party-cookie-eraser.php 92% from 13 tests

"Third Party Cookie Eraser" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 432 characters long)

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
Success! There were no dangerous files found in this plugin134 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14849134

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods571.43%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants5
▷ Global constants5100.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
No PNG files were detected