10% donate-to-website

Code Review | Donate to Website - Collect donations on your website

WordPress plugin Donate to Website - Collect donations on your website scored 10% from 54 tests.

About plugin

  • Plugin page: donate-to-website
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.9.2
  • First release: Aug 11, 2021
  • Latest release: Nov 20, 2021
  • Number of updates: 17
  • Update frequency: every 6.0 days
  • Top authors: loopwi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 664 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/donate-to-website/donate-to-website.php+65
    Trying to get property 'pid' of non-object

Server metrics [RAM: ▲0.01MB] [CPU: ▼304.22ms] Passed 4 tests

This is a short check of server-side resources used by Donate to Website - Collect donations on your website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0658.31 ▲3.51
Dashboard /wp-admin3.45 ▲0.0439.49 ▲0.80
Posts /wp-admin/edit.php3.67 ▲0.0341.34 ▼2.20
Add New Post /wp-admin/post-new.php6.91 ▼0.0698.24 ▼1,218.99
Media Library /wp-admin/upload.php3.32 ▲0.0229.86 ▲3.94
Settings /wp-admin/admin.php?page=donate2website_settings3.5632.84
Donate to Website Plugin /wp-admin/admin.php?page=donate2website3.5635.57

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 38 new files
Database: 1 new table, 1 new option
New tables
wp_d2wplugins_settings
New WordPress options
my_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Donate to Website - Collect donations on your website
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,946 ▲19216.33 ▲0.7410.58 ▲4.663.26 ▲0.46
Dashboard /wp-admin2,909 ▲486.26 ▲0.09117.56 ▼19.31163.36 ▼12.52
Posts /wp-admin/edit.php2,719 ▲253.24 ▲0.0064.92 ▼1.08143.44 ▼4.69
Add New Post /wp-admin/post-new.php1,680 ▲1916.39 ▼0.03411.99 ▼15.26165.07 ▼5.19
Media Library /wp-admin/upload.php1,726 ▲285.48 ▲0.01145.23 ▼2.37194.08 ▲1.55
Settings /wp-admin/admin.php?page=donate2website_settings1,2982.3953.59169.94
Donate to Website Plugin /wp-admin/admin.php?page=donate2website1,2892.5054.88112.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_d2wplugins_settings
  • This plugin does not fully uninstall, leaving 1 option in the database
    • my_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donate2website
    • > Notice in wp-content/plugins/donate-to-website/includes/dashboard.php+39
    Undefined variable: site_code

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/donate-to-website/includes/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/donate-to-website/includes/dashboard.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donate2website
    • > Network (severe)
    wp-content/plugins/donate-to-website/css/plugins.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donate2website
    • > Network (severe)
    wp-content/themes/twentytwentytwo/js/jquery.min.js?ver=3.6.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% 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
8 plugin tags: monetize, donate, blog, loopwi, gateway...

donate-to-website/donate-to-website.php 92% from 13 tests

The main file in "Donate to Website - Collect donations on your website" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected11,531 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS9222688,616
SVG1132,624
PHP37251275
JavaScript411116

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
5 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png8.35KB4.78KB▼ 42.77%
images/logo-light.png4.44KB3.26KB▼ 26.56%
images/bitnami.css.png8.35KB4.78KB▼ 42.77%
images/d2w.png7.73KB4.58KB▼ 40.75%
images/payment-methods.png42.08KB3.65KB▼ 91.32%