52% adopt

Code Review | AdOpt | The most beautiful Cookie Banner for GDPR, LGPD, CCPA, PIPEDA and POPIA.

WordPress plugin AdOpt | The most beautiful Cookie Banner for GDPR, LGPD, CCPA, PIPEDA and POPIA. scored52%from 54 tests.

About plugin

  • Plugin page: adopt
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.3-6.3.1
  • WordPress version: 6.3.1
  • First release: May 23, 2022
  • Latest release: Oct 13, 2023
  • Number of updates: 33
  • Update frequency: every 15.6 days
  • Top authors: goadopt (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /7,662 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼53.64ms] Passed 4 tests

Analyzing server-side resources used by AdOpt | The most beautiful Cookie Banner for GDPR, LGPD, CCPA, PIPEDA and POPIA.
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.18 ▼34.30
Dashboard /wp-admin2.09 ▼1.257.75 ▼53.78
Posts /wp-admin/edit.php2.10 ▼1.276.02 ▼40.31
Add New Post /wp-admin/post-new.php2.10 ▼3.806.11 ▼86.16
Media Library /wp-admin/upload.php2.10 ▼1.146.69 ▼28.72
Adopt /wp-admin/options-general.php?page=minhas-configuracoes2.106.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables
wp_disclaimerInfor
New WordPress options
can_compress_scripts
theysaidso_admin_options
jal_db_version
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for AdOpt | The most beautiful Cookie Banner for GDPR, LGPD, CCPA, PIPEDA and POPIA.
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7914.46 ▲0.082.57 ▲0.9844.73 ▲4.65
Dashboard /wp-admin2,198 ▲245.54 ▲0.0184.90 ▼0.9441.43 ▲3.20
Posts /wp-admin/edit.php2,106 ▲61.98 ▼0.0333.60 ▼3.8334.10 ▲0.48
Add New Post /wp-admin/post-new.php1,531 ▲523.18 ▲0.16642.05 ▼56.5151.17 ▼10.65
Media Library /wp-admin/upload.php1,406 ▲64.20 ▲0.0392.91 ▼5.5940.90 ▼1.16
Adopt /wp-admin/options-general.php?page=minhas-configuracoes8462.1222.8725.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the adopt-stylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_disclaimerInfor
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • jal_db_version
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=minhas-configuracoes
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the adopt-stylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/adopt/includes/style.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/adopt/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #12, #13, #14, #15, #16 in adopt/assets to your readme.txt
Please take inspiration from this readme.txt

adopt/index.php 85% from 13 tests

The main PHP file in "AdOpt | The most beautiful Cookie Banner for GDPR, LGPD, CCPA, PIPEDA and POPIA." ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 230 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("adopt.php" instead of "index.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
No dangerous file extensions were detected300 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP56110233
CSS16057
SVG20010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity4.00
▷ Minimum method complexity4.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/img/Logo-hirizontal-gradiente.png8.38KB4.47KB▼ 46.72%
_inc/img/sdfsdfsdfasbsr.png2.79KB1.39KB▼ 50.02%