73% wp-paypal-donate

Code Review | WP Paypal Donate

WordPress plugin WP Paypal Donate scored73%from 54 tests.

About plugin

  • Plugin page: wp-paypal-donate
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.0
  • WordPress version: 6.3.1
  • First release: Nov 29, 2013
  • Latest release: Mar 16, 2016
  • Number of updates: 5
  • Update frequency: every 167.8 days
  • Top authors: xhacky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,658 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.35ms] Passed 4 tests

An overview of server-side resources used by WP Paypal Donate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.19 ▼7.05
Dashboard /wp-admin3.37 ▲0.0742.84 ▼5.07
Posts /wp-admin/edit.php3.42 ▲0.0745.65 ▼3.95
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.34 ▼11.74
Media Library /wp-admin/upload.php3.29 ▲0.0634.34 ▼5.52
WP Paypal Donate /wp-admin/options-general.php?page=wpd-settings3.2932.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
wpd-saved-forms

Browser metrics Passed 4 tests

WP Paypal Donate: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.48 ▼0.061.81 ▼0.1044.69 ▼2.02
Dashboard /wp-admin2,212 ▲244.84 ▼1.06108.84 ▲1.1438.83 ▼3.49
Posts /wp-admin/edit.php2,095 ▲32.04 ▲0.0442.32 ▲5.5135.27 ▲1.42
Add New Post /wp-admin/post-new.php1,519 ▼1423.29 ▲0.14610.04 ▼41.6759.65 ▼3.02
Media Library /wp-admin/upload.php1,397 ▲124.15 ▼0.0698.92 ▼3.0442.52 ▼1.31
WP Paypal Donate /wp-admin/options-general.php?page=wpd-settings1,3472.2629.2435.55

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • wpd-saved-forms
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% 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)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpd-settings
    • > Notice in wp-content/plugins/wp-paypal-donate/views/settings.php+198
    Undefined index: return

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/wp-paypal-donate/views/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-paypal-donate/views/forms-selector.php:19
    • > PHP Notice
      Undefined variable: savedForms in wp-content/plugins/wp-paypal-donate/views/forms-selector.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-paypal-donate/wp-paypal-donate.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=wpd-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at Object.pagesdropdown (/wp-content/plugins/wp-paypal-donate/assets/admin/js/wp-paypal-donate.js?ver=3.5.2:12:30)\n at Object.init (/wp-content/plugins/wp-paypal-donate/assets/admin/js/wp-paypal-donate.js?ver=3.5.2:7:17)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-paypal-donate/assets/admin/js/wp-paypal-donate.js?ver=3.5.2:33:11)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wpd-settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: donate, wordpress donations, donations, paypal form, paypal

wp-paypal-donate/wp-paypal-donate.php Passed 13 tests

"WP Paypal Donate" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
58 characters long description:
receive donations with your paypal account in a few steps!

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
Everything looks great! No dangerous files found in this plugin573 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP39832501
JavaScript212059
Markdown18012
CSS1081

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 are no PNG files in this plugin