68% dynamic-donation

Code Review | Dynamic Donation paypal payflow

WordPress plugin Dynamic Donation paypal payflow scored68%from 54 tests.

About plugin

  • Plugin page: dynamic-donation
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.0.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: Jan 25, 2019
  • Number of updates: 5
  • Update frequency: every 278.0 days
  • Top authors: faaiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,437 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼9.35ms] Passed 4 tests

Server-side resources used by Dynamic Donation paypal payflow
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.40 ▼3.80
Dashboard /wp-admin3.50 ▲0.1651.39 ▼12.36
Posts /wp-admin/edit.php3.61 ▲0.2647.80 ▼0.55
Add New Post /wp-admin/post-new.php6.08 ▲0.2086.93 ▼20.69
Media Library /wp-admin/upload.php3.42 ▲0.1936.39 ▲0.82
Export Template /wp-admin/edit.php?post_type=donation-form&page=subddft3.3732.64
Payment Settings /wp-admin/edit.php?post_type=donation-form&page=subddfp3.3932.44
Add New /wp-admin/post-new.php?post_type=donation-form3.4644.42
Manage Fields /wp-admin/edit.php?post_type=donation-form&page=subddf3.3730.78
All Donations /wp-admin/edit.php?post_type=donation-form3.4738.78

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_ddf_fields
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Dynamic Donation paypal payflow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.63 ▲0.601.88 ▲0.2044.22 ▲5.14
Dashboard /wp-admin2,235 ▲585.57 ▼0.0187.33 ▼2.3139.28 ▼3.30
Posts /wp-admin/edit.php2,140 ▲402.02 ▼0.0135.58 ▼1.2832.88 ▼3.92
Add New Post /wp-admin/post-new.php1,559 ▲3121.07 ▼1.91685.90 ▲79.0556.13 ▲4.51
Media Library /wp-admin/upload.php1,440 ▲404.25 ▲0.0595.30 ▲0.3742.82 ▲1.13
Export Template /wp-admin/edit.php?post_type=donation-form&page=subddft8272.0022.6426.65
Payment Settings /wp-admin/edit.php?post_type=donation-form&page=subddfp9911.6823.1127.04
Add New /wp-admin/post-new.php?post_type=donation-form1,5352.5147.8352.77
Manage Fields /wp-admin/edit.php?post_type=donation-form&page=subddf1,1072.0422.9140.59
All Donations /wp-admin/edit.php?post_type=donation-form1,1011.9630.7930.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ddf_fields
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=donation-form&page=subddft
    • > Notice in wp-content/plugins/dynamic-donation/wp-dynamic-donation.php+381
    Undefined offset: 1
    • > GET request to /wp-admin/edit.php?post_type=donation-form&page=subddf
    • > Notice in wp-content/plugins/dynamic-donation/wp-dynamic-donation.php+869
    Undefined variable: html

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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/dynamic-donation/wp-dynamic-donation.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-donation/wp-dynamic-donation.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: paypal website pro donation, credit card donation, payflow pro donation, paypal donation, donation form...

dynamic-donation/wp-dynamic-donation.php 92% from 13 tests

The principal PHP file in "Dynamic Donation paypal payflow" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dynamic-donation.php" instead of "wp-dynamic-donation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin959 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP125020925
JavaScript17034

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity78.00
▷ Minimum class complexity78.00
▷ Maximum class complexity78.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin