79% easy-donation-for-woocommerce

Code Review | Easy Donation for Woocommerce

WordPress plugin Easy Donation for Woocommerce scored79%from 54 tests.

About plugin

  • Plugin page: easy-donation-for...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 2, 2022
  • Latest release: Sep 5, 2023
  • Number of updates: 7
  • Update frequency: every 44.0 days
  • Top authors: itpathsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /621 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.60ms] Passed 4 tests

Analyzing server-side resources used by Easy Donation for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1345.53 ▲7.05
Dashboard /wp-admin3.41 ▲0.1053.63 ▲5.63
Posts /wp-admin/edit.php3.52 ▲0.1648.17 ▲1.46
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.17 ▼9.62
Media Library /wp-admin/upload.php3.33 ▲0.1039.41 ▲4.95

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Donation for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲17313.63 ▼0.955.54 ▲3.6642.78 ▲2.21
Dashboard /wp-admin2,231 ▲405.83 ▲0.92100.52 ▼12.4938.37 ▼3.62
Posts /wp-admin/edit.php2,110 ▲212.06 ▲0.0636.85 ▲1.5432.81 ▼1.89
Add New Post /wp-admin/post-new.php1,533 ▼217.68 ▼5.41589.61 ▼78.1657.11 ▲1.42
Media Library /wp-admin/upload.php1,410 ▲254.20 ▼0.0694.28 ▼14.4442.56 ▼0.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-donation-for-woocommerce/public/partials/easy-donation-for-woocommerce-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Donation_For_Woocommerce' not found in wp-content/plugins/easy-donation-for-woocommerce/admin/partials/easy-donation-for-woocommerce-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce, donation, checkout, wordpress, tip

easy-donation-for-woocommerce/easy-donation-for-woocommerce.php Passed 13 tests

The principal PHP file in "Easy Donation for Woocommerce" v. 1.0.3 is loaded by WordPress automatically on each request
71 characters long description:
Allow customers to add Donation directly from WooCommerce checkout page

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
Success! There were no dangerous files found in this plugin492 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12155549416
CSS25861
JavaScript395415

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods38.57%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin