77% charity-donation-for-woocommerce

Code Review | Charity & Donation for Woocommerce

WordPress plugin Charity & Donation for Woocommerce scored 77% from 54 tests.

About plugin

  • Plugin page: charity-donation-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jan 12, 2021
  • Latest release: Feb 26, 2022
  • Number of updates: 7
  • Update frequency: every 59.1 days
  • Top authors: avdevelopers426 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 486 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Charity & Donation for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.50 ▲4.35
Dashboard /wp-admin3.41 ▲0.0031.47 ▼3.08
Posts /wp-admin/edit.php3.65 ▲0.0038.76 ▲1.82
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.73 ▼1,163.47
Media Library /wp-admin/upload.php3.30 ▲0.0024.44 ▲1.99
Charity & Donation for Woocommerce /wp-admin/admin.php?page=chdntwc-donation-page3.1020.11
Essential Kit /wp-admin/admin.php?page=chdntwc_kit3.1018.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 1 new option
New WordPress options
chdntwc_donation_product

Browser metrics Passed 4 tests

An overview of browser requirements for Charity & Donation for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,837 ▲8316.19 ▲0.545.90 ▼0.102.10 ▼0.23
Dashboard /wp-admin2,895 ▲345.98 ▼0.23120.72 ▼14.90159.79 ▼9.74
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0065.13 ▼0.35142.98 ▲2.11
Add New Post /wp-admin/post-new.php1,640 ▼2120.41 ▼2.30414.56 ▼17.50168.79 ▲14.02
Media Library /wp-admin/upload.php1,730 ▲295.63 ▲0.14138.41 ▼10.81178.43 ▼8.93
Charity & Donation for Woocommerce /wp-admin/admin.php?page=chdntwc-donation-page280.940.0318.08
Essential Kit /wp-admin/admin.php?page=chdntwc_kit280.940.0618.13

Uninstaller [IO: ▲0.09MB] [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
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • chdntwc_donation_product

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/charity-donation-for-woocommerce/charity-and-donation-for-woocommerce.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=chdntwc-donation-page
    • > Network (severe)
    wp-admin/admin.php?page=chdntwc-donation-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=chdntwc_kit
    • > Network (severe)
    wp-admin/admin.php?page=chdntwc_kit - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #2, #3, #4, #5, #6, #7, #8, #9 in charity-donation-for-woocommerce/assets to your readme.txt
The official readme.txt might help

charity-donation-for-woocommerce/charity-and-donation-for-woocommerce.php 85% from 13 tests

The primary PHP file in "Charity & Donation for Woocommerce" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("charity-donation-for-woocommerce.php" instead of "charity-and-donation-for-woocommerce.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,194 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5228171,658
CSS244410
JavaScript2190125
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity28.00
▷ Minimum class complexity3.00
▷ Maximum class complexity64.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods512.20%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
4 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/star.png39.75KB10.35KB▼ 73.95%
images/donation-product.png23.42KB9.19KB▼ 60.78%
images/support.png6.44KB5.59KB▼ 13.09%
images/review.png15.87KB11.90KB▼ 25.01%