10% woo-donation

Code Review | Woo Donation

WordPress plugin Woo Donation scored10%from 54 tests.

About plugin

  • Plugin page: woo-donation
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: Jan 28, 2023
  • Number of updates: 20
  • Update frequency: every 122.4 days
  • Top authors: sunil25393 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,986 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/woo-donation/woo_donations.php+369
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.72MB] [CPU: ▼53.26ms] Passed 4 tests

Analyzing server-side resources used by Woo Donation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.205.88 ▼33.25
Dashboard /wp-admin2.28 ▼1.0213.28 ▼42.40
Posts /wp-admin/edit.php2.28 ▼1.079.58 ▼38.37
Add New Post /wp-admin/post-new.php2.28 ▼3.607.81 ▼99.02
Media Library /wp-admin/upload.php2.28 ▼0.947.04 ▼28.58
Donation /wp-admin/admin.php?page=donation-settings-page2.289.05

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Woo Donation: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.17 ▼0.181.53 ▲0.0239.96 ▲0.94
Dashboard /wp-admin2,206 ▲265.53 ▲0.0085.65 ▼6.0639.98 ▲2.07
Posts /wp-admin/edit.php2,115 ▲152.00 ▲0.0438.42 ▲1.9137.04 ▲3.46
Add New Post /wp-admin/post-new.php1,549 ▲2318.34 ▼4.79642.03 ▼34.3070.31 ▲16.46
Media Library /wp-admin/upload.php1,411 ▲144.23 ▼0.0093.68 ▼2.5346.27 ▲6.39
Donation /wp-admin/admin.php?page=donation-settings-page1,2282.0123.1133.71

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/woo-donation/woo_donations.php+369
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=donation-settings-page
    • > Notice in wp-content/plugins/woo-donation/woo_donations.php+302
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/woo-donation/woo_donations.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=donation-settings-page
    • > Network (severe)
    http://sunilprajapati.in/wp-content/uploads/2016/07/banner-772x250-Recovered-1-e1468772793646.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

woo-donation/woo_donations.php 92% from 13 tests

The main PHP file in "Woo Donation" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-donation.php" instead of "woo_donations.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected814 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP120256632
PO File2459198
CSS12084

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
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
img/donation.png14.12KB5.10KB▼ 63.90%