72% very-simple-paypal-donation-form

Code Review | Very Simple PayPal Donation Form

WordPress plugin Very Simple PayPal Donation Form scored72%from 54 tests.

About plugin

  • Plugin page: very-simple-paypa...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Dec 5, 2022
  • Number of updates: 8
  • Update frequency: every 215.8 days
  • Top authors: springthistle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,957 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.87ms] Passed 4 tests

An overview of server-side resources used by Very Simple PayPal Donation Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0547.49 ▲7.08
Dashboard /wp-admin3.36 ▲0.0652.16 ▼4.48
Posts /wp-admin/edit.php3.48 ▲0.1250.41 ▼6.21
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.77 ▼5.44
Media Library /wp-admin/upload.php3.29 ▲0.0540.04 ▲4.64
Donation Form /wp-admin/options-general.php?page=vsdf_settings3.2634.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Very Simple PayPal Donation Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17913.56 ▼0.798.85 ▲7.2542.82 ▼9.85
Dashboard /wp-admin2,212 ▲274.86 ▼1.00102.68 ▼21.5438.97 ▼9.68
Posts /wp-admin/edit.php2,074 ▼152.06 ▲0.0337.79 ▼7.3131.83 ▼3.26
Add New Post /wp-admin/post-new.php1,519 ▼1817.71 ▼5.87654.91 ▼20.2171.27 ▲7.39
Media Library /wp-admin/upload.php1,397 ▲94.28 ▲0.16104.47 ▼18.6845.39 ▼0.04
Donation Form /wp-admin/options-general.php?page=vsdf_settings9921.7228.1335.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vsdf_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vsdf_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vsdf_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vsdf_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/very-simple-paypal-donation-form/views/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_options() on null in wp-content/plugins/very-simple-paypal-donation-form/views/donationform.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=vsdf_settings
    • > Network (severe)
    wp-content/plugins/very-simple-paypal-donation-form//assets/springthistle-logo.png' - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can look at the official readme.txt

very-simple-paypal-donation-form/vs_donor_form.php 92% from 13 tests

This is the main PHP file of "Very Simple PayPal Donation Form" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("very-simple-paypal-donation-form.php" instead of "vs_donor_form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin717 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP57460384
CSS2252288
JavaScript111545

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.50
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/springthistle-logo.png10.78KB5.48KB▼ 49.20%