84% easy-paypal-digital-downloads

Code Review | PayPal Digital Downloads

WordPress plugin PayPal Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: easy-paypal-digit...
  • Plugin version: 1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 13, 2015
  • Latest release: Nov 17, 2017
  • Number of updates: 19
  • Update frequency: every 51.6 days
  • Top authors: scottpaterson (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /13,795 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.78ms] Passed 4 tests

Server-side resources used by PayPal Digital Downloads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.80 ▲2.29
Dashboard /wp-admin3.40 ▲0.1050.29 ▼1.59
Posts /wp-admin/edit.php3.45 ▲0.1044.43 ▼6.70
Add New Post /wp-admin/post-new.php5.98 ▲0.1094.79 ▼1.12
Media Library /wp-admin/upload.php3.32 ▲0.1036.10 ▲2.97
Digital Downloads /wp-admin/options-general.php?page=easy-paypal-digital-download3.2930.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
wpepdd_my_plugin_notice_shown
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
wpepdd_settingsoptions

Browser metrics Passed 4 tests

An overview of browser requirements for PayPal Digital Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.29 ▼1.112.42 ▲0.7239.53 ▼9.08
Dashboard /wp-admin2,210 ▲225.79 ▼0.1099.98 ▲1.7139.01 ▼3.40
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0437.74 ▼2.5332.36 ▼2.70
Add New Post /wp-admin/post-new.php1,627 ▲11323.08 ▲5.55664.53 ▼27.6665.03 ▼1.83
Media Library /wp-admin/upload.php1,386 ▲14.15 ▲0.0295.72 ▼15.7442.56 ▼1.87
Digital Downloads /wp-admin/options-general.php?page=easy-paypal-digital-download1,3532.0733.6939.84

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • wpepdd_settingsoptions
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-paypal-digital-downloads/include/paypalfunctions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-paypal-digital-downloads/include/paypalfunctions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-paypal-digital-downloads/include/paypalfunctions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/easy-paypal-digital-downloads/paypal-digital-downloads.php:139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-paypal-digital-downloads/include/cancel.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: downloads, digital downloads, paypal, digital goods, shop

easy-paypal-digital-downloads/paypal-digital-downloads.php 92% from 13 tests

"PayPal Digital Downloads" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-paypal-digital-downloads.php" instead of "paypal-digital-downloads.php")

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 plugin871 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP646354871

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.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 images were found in this plugin