62% wappaa-cookies-gdpr-and-pwa-app

Code Review | Wappaa Cookies GDPR and PWA App

WordPress plugin Wappaa Cookies GDPR and PWA App scored62%from 54 tests.

About plugin

  • Plugin page: wappaa-cookies-gd...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: May 1, 2020
  • Latest release: May 1, 2020
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: nivben27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /442 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.22MB] [CPU: ▼45.70ms] Passed 4 tests

This is a short check of server-side resources used by Wappaa Cookies GDPR and PWA App
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7114.07 ▼27.98
Dashboard /wp-admin2.79 ▼0.5115.62 ▼34.65
Posts /wp-admin/edit.php2.79 ▼0.5616.68 ▼34.34
Add New Post /wp-admin/post-new.php2.79 ▼3.0917.05 ▼85.84
Media Library /wp-admin/upload.php2.79 ▼0.4415.24 ▼19.91
Wappaa tools /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php2.7917.62

Server storage [IO: ▲0.99MB] [DB: ▲0.08MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wappaa Cookies GDPR and PWA App
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.421.74 ▼0.0338.39 ▼3.42
Dashboard /wp-admin2,196 ▲295.63 ▼0.0492.33 ▼9.3144.60 ▲1.40
Posts /wp-admin/edit.php2,104 ▲42.11 ▲0.0840.58 ▲5.7240.97 ▲5.99
Add New Post /wp-admin/post-new.php1,529 ▲323.48 ▲0.76685.12 ▲46.5155.07 ▲1.40
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.05107.17 ▼0.4745.55 ▲0.62
Wappaa tools /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php1,9637.05172.37132.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Warning in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+13
    include(../wappaa.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Warning in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+13
    include(): Failed opening '../wappaa.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+286
    Undefined index: backgroundp
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+292
    Undefined index: opa
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+297
    Undefined index: btinst
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+302
    Undefined index: btinsttxt
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+307
    Undefined index: clsbtn
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+312
    Undefined index: headertext
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+317
    Undefined index: contenttext
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+331
    Undefined index: headetextc
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+345
    Undefined index: installbtntext
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+350
    Undefined index: timeoutp
    • > GET request to /wp-admin/options-general.php?page=wappaa-cookies-gdpr-and-pwa-app/wappaa.php
    • > Notice in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/options.php+380
    Undefined index: contenthtmltext

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/meta.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/wappaa.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/wappaa.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wappaa-cookies-gdpr-and-pwa-app/inc/bottomsection.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: pwa, app, wappaa cookies gdpr, cookies, notice cookies banner

wappaa-cookies-gdpr-and-pwa-app/wappaa.php 77% from 13 tests

"Wappaa Cookies GDPR and PWA App" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("wappaa-cookies-gdpr-and-pwa-app.php" instead of "wappaa.php")
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist

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
Everything looks great! No dangerous files found in this plugin757 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP428281757

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.42MB with 0.27MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png372.19KB101.69KB▼ 72.68%
assets/Screenshot_2.png57.60KB24.80KB▼ 56.95%