79% tap-cookies

Code Review | TAP Cookies

WordPress plugin TAP Cookies scored79%from 54 tests.

About plugin

  • Plugin page: tap-cookies
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 26, 2014
  • Latest release: Jul 28, 2016
  • Number of updates: 10
  • Update frequency: every 70.2 days
  • Top authors: todoapuestas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼0.54ms] Passed 4 tests

This is a short check of server-side resources used by TAP Cookies
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.29 ▼1.07
Dashboard /wp-admin3.61 ▲0.3154.44 ▼4.84
Posts /wp-admin/edit.php3.66 ▲0.3054.71 ▲4.85
Add New Post /wp-admin/post-new.php6.13 ▲0.24105.33 ▼0.16
Media Library /wp-admin/upload.php3.47 ▲0.2443.18 ▲3.92
TAP Cookies /wp-admin/options-general.php?page=tap-cookies3.4435.89

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
tap_cookies_list
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
tap_cookies_information_box_text
tap_cookies_information_box_title
tap_cookies_information_box_position

Browser metrics Passed 4 tests

A check of browser resources used by TAP Cookies
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,031 ▲27013.45 ▼0.9217.42 ▲15.6743.21 ▼2.08
Dashboard /wp-admin2,252 ▲755.64 ▲0.0482.88 ▼15.5441.29 ▼4.08
Posts /wp-admin/edit.php2,101 ▲11.98 ▲0.0139.11 ▲2.0234.64 ▼2.95
Add New Post /wp-admin/post-new.php1,529 ▲123.51 ▲0.37666.04 ▼18.9151.60 ▼14.89
Media Library /wp-admin/upload.php1,401 ▲14.23 ▲0.02104.52 ▼2.4147.21 ▲2.80
TAP Cookies /wp-admin/options-general.php?page=tap-cookies8391.9922.5427.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tap-cookies/public/views/public.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tap-cookies/admin/views/admin.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PaintCloud\\WP\\Settings\\Page' not found in wp-content/plugins/tap-cookies/admin/includes/settings/options/configurations.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: cookies, europe cookie law

tap-cookies/tap-cookies.php Passed 13 tests

The primary PHP file in "TAP Cookies" version 1.2.5 is used by WordPress to initiate all plugin functionality
54 characters long description:
Display a information message about Europe Cookies Law

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,434 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP144405761,266
JavaScript917354635
CSS61523419
Markdown1540114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.55
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods86
▷ Static methods78.14%
▷ Public methods8194.19%
▷ Protected methods00.00%
▷ Private methods55.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/includes/settings/images/handle.png0.21KB0.20KB▼ 5.66%