84% uncommongood-donation-widget

Code Review | UncommonGood Donation Widget

WordPress plugin UncommonGood Donation Widget scored84%from 54 tests.

About plugin

  • Plugin page: uncommongood-dona...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 12, 2022
  • Latest release: Apr 26, 2023
  • Number of updates: 8
  • Update frequency: every 17.6 days
  • Top authors: uncommongood (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /543 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.02MB] [CPU: ▼8.89ms] Passed 4 tests

Server-side resources used by UncommonGood Donation Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0423.57 ▼17.79
Dashboard /wp-admin3.35 ▲0.0443.93 ▼4.95
Posts /wp-admin/edit.php3.40 ▲0.0447.39 ▼4.45
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.35 ▼8.38
Media Library /wp-admin/upload.php3.27 ▲0.0435.08 ▼0.26

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for UncommonGood Donation Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲11914.41 ▲0.041.91 ▲0.2537.42 ▼9.97
Dashboard /wp-admin2,235 ▲444.86 ▼1.17112.63 ▲12.0542.78 ▲0.66
Posts /wp-admin/edit.php2,122 ▲332.02 ▲0.0340.48 ▲1.2939.49 ▼0.27
Add New Post /wp-admin/post-new.php1,547 ▲1423.24 ▼0.15660.16 ▼29.2649.83 ▼17.29
Media Library /wp-admin/upload.php1,418 ▲304.24 ▲0.05101.38 ▼9.3543.49 ▼3.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/uncommongood-donation-widget/uncommongood_donation_widget.php:253

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: nonprofits, donation, nonprofit, recurring donations, fundraising...

uncommongood-donation-widget/uncommongood_donation_widget.php 85% from 13 tests

The entry point to "UncommonGood Donation Widget" version 1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("uncommongood-donation-widget.php" instead of "uncommongood_donation_widget.php")

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
No dangerous file extensions were detected154 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13769154

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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