84% aws-cookies-popup

Code Review | AWS Cookies Popup

WordPress plugin AWS Cookies Popup scored84%from 54 tests.

About plugin

  • Plugin page: aws-cookies-popup
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Nov 24, 2023
  • Number of updates: 39
  • Update frequency: every 66.7 days
  • Top authors: AddWeb Solution Pvt. Ltd. (94.87%)snehalb890 (7.69%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,561 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.84ms] Passed 4 tests

Server-side resources used by AWS Cookies Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0628.87 ▼8.63
Dashboard /wp-admin3.33 ▲0.0245.48 ▼3.77
Posts /wp-admin/edit.php3.44 ▲0.0847.01 ▼5.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.86 ▼5.02
Media Library /wp-admin/upload.php3.25 ▲0.0235.03 ▼0.90
AWS Cookie Popup /wp-admin/options-general.php?page=aws-cookies3.2831.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AWS Cookies Popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲24315.20 ▲0.8518.09 ▲16.5447.18 ▲9.28
Dashboard /wp-admin2,207 ▲305.75 ▲0.1997.92 ▼1.5741.87 ▼1.93
Posts /wp-admin/edit.php2,115 ▲152.46 ▲0.5247.22 ▲6.3435.49 ▼3.64
Add New Post /wp-admin/post-new.php1,533 ▲723.23 ▼0.26637.81 ▼31.3748.81 ▼2.30
Media Library /wp-admin/upload.php1,415 ▲125.10 ▲0.78104.97 ▲7.5940.46 ▼1.07
AWS Cookie Popup /wp-admin/options-general.php?page=aws-cookies2,4846.12130.1664.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aws-cookies-popup/trunk/lib/template-functions.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/aws-cookies-popup/trunk/lib/constants.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/aws-cookies-popup/trunk/lib/constants.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/aws-cookies-popup/lib/constants.php:16
    • > PHP Notice
      Undefined variable: page_title in wp-content/plugins/aws-cookies-popup/template_part/radio_options.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/aws-cookies-popup/template_part/radio_options.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aws-cookies-popup/trunk/template_part/messagebox.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aws-cookies-popup/template_part/messagebox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aws-cookies-popup/lib/template-functions.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/aws-cookies-popup/lib/constants.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: notification, popup notification, cookie popup, cookie, cookie notification...

aws-cookies-popup/aws-cookie-popup.php 85% from 13 tests

"AWS Cookies Popup" version 1.5.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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aws-cookies-popup.php" instead of "aws-cookie-popup.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,446 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
SVG714687
PHP6160369453
CSS43611167
JavaScript74565139

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods616.67%
▷ Public methods3083.33%
▷ Protected methods00.00%
▷ Private methods616.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.21MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/addweb-logo.png11.75KB4.57KB▼ 61.12%
img/wewp-logo.png39.91KB20.18KB▼ 49.44%
trunk/img/icon.png0.31KB0.23KB▼ 23.32%
trunk/img/wewp-ad-plugin-400.png15.32KB8.89KB▼ 42.00%
trunk/img/addweb-logo.png11.75KB4.57KB▼ 61.12%