68% give-as-you-live

Code Review | Give as you Live

WordPress plugin Give as you Live scored68%from 54 tests.

About plugin

  • Plugin page: give-as-you-live
  • Plugin version: 1.0.12
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2022
  • Latest release: Jul 4, 2023
  • Number of updates: 35
  • Update frequency: every 14.4 days
  • Top authors: giveasyoulive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /895 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
Installer ran successfully

Server metrics [RAM: ▼1.78MB] [CPU: ▼47.95ms] Passed 4 tests

A check of server-side resources used by Give as you Live
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.267.52 ▼31.37
Dashboard /wp-admin2.22 ▼1.0810.34 ▼39.52
Posts /wp-admin/edit.php2.22 ▼1.138.61 ▼37.41
Add New Post /wp-admin/post-new.php2.22 ▼3.667.70 ▼83.48
Media Library /wp-admin/upload.php2.22 ▼1.009.08 ▼27.84
Buttons, Forms & Pages /wp-admin/admin.php?page=wpgayl_buttons2.228.24
Settings /wp-admin/admin.php?page=wpgayl_settings2.229.87

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
wpgayl_notice_shown
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Give as you Live: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲5013.50 ▼0.924.43 ▲2.3844.47 ▼2.98
Dashboard /wp-admin2,230 ▲505.54 ▼0.0884.62 ▼7.9034.42 ▼5.31
Posts /wp-admin/edit.php2,139 ▲392.03 ▼0.0537.30 ▼0.4731.87 ▼9.29
Add New Post /wp-admin/post-new.php6,383 ▲4,84627.49 ▲9.29821.29 ▲199.9277.51 ▼2.24
Media Library /wp-admin/upload.php1,438 ▲354.22 ▼0.0199.91 ▲1.8541.90 ▲0.65
Buttons, Forms & Pages /wp-admin/admin.php?page=wpgayl_buttons9722.0527.8428.71
Settings /wp-admin/admin.php?page=wpgayl_settings1,5042.6169.9535.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script 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 giveasyoulive_admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpgayl_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script 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 giveasyoulive_admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpgayl_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script 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 giveasyoulive_public handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpgayl_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 giveasyoulive_admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpgayl_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 giveasyoulive_public handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/give-as-you-live/admin/api.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/give-as-you-live/public/shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/give-as-you-live/admin/buttons_delete.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/give-as-you-live/admin/buttons_form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/give-as-you-live/admin/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/give-as-you-live/admin/functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/give-as-you-live/admin/buttons_form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/give-as-you-live/give-as-you-live.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/give-as-you-live/admin/block.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/give-as-you-live/admin/buttons_edit.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: donate, give as you live, charities, gayl, donation...

give-as-you-live/give-as-you-live.php 92% from 13 tests

The main file in "Give as you Live" v. 1.0.12 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,829 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP163541531,824
JavaScript3033
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions3992.86%
▷ Anonymous functions37.14%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin