84% double-the-donation

Code Review | Double the Donation - A matching gift plug-in to help your fundraising efforts

WordPress plugin Double the Donation - A matching gift plug-in to help your fundraising efforts scored84%from 54 tests.

About plugin

  • Plugin page: double-the-donation
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 27, 2018
  • Latest release: Jul 22, 2023
  • Number of updates: 17
  • Update frequency: every 163.4 days
  • Top authors: kanwei_doublethedonation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /2,703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.76ms] Passed 4 tests

This is a short check of server-side resources used by Double the Donation - A matching gift plug-in to help your fundraising efforts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.20 ▼4.42
Dashboard /wp-admin3.33 ▼0.0140.60 ▼17.87
Posts /wp-admin/edit.php3.39 ▲0.0344.91 ▲1.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.44 ▼21.72
Media Library /wp-admin/upload.php3.26 ▲0.0331.66 ▼3.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
doublethedonation_api_host
can_compress_scripts
doublethedonation_cache_version
widget_recent-posts
theysaidso_admin_options
doublethedonation_public_key

Browser metrics Passed 4 tests

An overview of browser requirements for Double the Donation - A matching gift plug-in to help your fundraising efforts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.27 ▼0.011.58 ▲0.0637.00 ▼4.46
Dashboard /wp-admin2,214 ▲345.64 ▲0.0396.01 ▲10.5942.37 ▲0.00
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.0140.68 ▲4.5136.57 ▼0.34
Add New Post /wp-admin/post-new.php1,539 ▲1323.11 ▼0.37696.06 ▲1.1656.53 ▲3.47
Media Library /wp-admin/upload.php1,419 ▲194.20 ▼0.0098.25 ▼11.9242.09 ▼5.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • doublethedonation_cache_version
    • doublethedonation_public_key
    • doublethedonation_api_host
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/double-the-donation/doublethedonation.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/double-the-donation/doublethedonation.php on line 15
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/double-the-donation/doublethedonation.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: matching gifts, double the donation, donation matching

double-the-donation/doublethedonation.php 92% from 13 tests

Analyzing the main PHP file in "Double the Donation - A matching gift plug-in to help your fundraising efforts" version 1.1.2
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("double-the-donation.php" instead of "doublethedonation.php")

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
Success! There were no dangerous files found in this plugin180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15417180

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin