73% easy-donation

Code Review | Easy Donation

WordPress plugin Easy Donation scored73%from 54 tests.

About plugin

  • Plugin page: easy-donation
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-3.9
  • WordPress version: 6.3.1
  • First release: Nov 8, 2012
  • Latest release: Apr 17, 2014
  • Number of updates: 7
  • Update frequency: every 75.9 days
  • Top authors: innerfire (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /6,633 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.65MB] [CPU: ▼50.53ms] Passed 4 tests

An overview of server-side resources used by Easy Donation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.35 ▼1.119.80 ▼26.65
Dashboard /wp-admin2.37 ▼0.9811.29 ▼47.42
Posts /wp-admin/edit.php2.37 ▼0.9913.15 ▼35.59
Add New Post /wp-admin/post-new.php2.37 ▼3.5212.00 ▼92.44
Media Library /wp-admin/upload.php2.37 ▼0.8610.57 ▼22.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Donation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.68 ▼0.751.65 ▲0.0740.68 ▼1.01
Dashboard /wp-admin2,206 ▲175.89 ▲0.92106.06 ▼8.2541.69 ▼0.81
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0339.74 ▼0.6134.64 ▼0.83
Add New Post /wp-admin/post-new.php1,533 ▼923.20 ▲4.87653.35 ▲44.8652.96 ▼15.95
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.0499.67 ▲2.2040.45 ▼4.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Widget_InspirePay_Donation is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_inspirepay_donation

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-donation/widgets/widget-inspirepay-donation.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-donation/classes/class-inspirepay-donations.php:25

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === easy-donation === )
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

easy-donation/inspirepay-donations.php 92% from 13 tests

The main PHP file in "Easy Donation" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-donation.php" instead of "inspirepay-donations.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
Good job! No executable or dangerous file extensions detected134 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33499134

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.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
No PNG files were detected