78% pal-for-edd

Code Review | PayPal For Easy Digital Downloads (EDD)

WordPress plugin PayPal For Easy Digital Downloads (EDD) scored78%from 54 tests.

About plugin

  • Plugin page: pal-for-edd
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: May 19, 2016
  • Latest release: Aug 17, 2016
  • Number of updates: 20
  • Update frequency: every 4.6 days
  • Top authors: gmexsoftware (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /13,556 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: ▲1.09MB] [CPU: ▼3.54ms] Passed 4 tests

A check of server-side resources used by PayPal For Easy Digital Downloads (EDD)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.46 ▲0.9928.98 ▼8.00
Dashboard /wp-admin4.43 ▲1.1246.91 ▲1.07
Posts /wp-admin/edit.php4.46 ▲1.1149.46 ▲3.41
Add New Post /wp-admin/post-new.php7.14 ▲1.2575.26 ▼10.65
Media Library /wp-admin/upload.php4.36 ▲1.1440.04 ▲6.68

Server storage [IO: ▲0.35MB] [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: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for PayPal For Easy Digital Downloads (EDD)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.53 ▼0.849.03 ▲7.3738.79 ▼3.82
Dashboard /wp-admin2,213 ▲364.93 ▼0.6593.54 ▲4.6838.53 ▼1.95
Posts /wp-admin/edit.php2,105 ▲232.34 ▲0.3640.36 ▲4.3336.71 ▼0.99
Add New Post /wp-admin/post-new.php1,546 ▲1823.10 ▼0.21678.92 ▲43.7964.89 ▲3.96
Media Library /wp-admin/upload.php1,422 ▲284.26 ▲0.0692.54 ▼5.2942.38 ▼5.70

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pal-for-edd/admin/partials/pal-for-edd-admin-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pal-for-edd/public/partials/pal-for-edd-public-display.php:108

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
The official readme.txt is a good inspiration

pal-for-edd/pal-for-edd.php Passed 13 tests

The main PHP file in "PayPal For Easy Digital Downloads (EDD)" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
39 characters long description:
PayPal For Easy Digital Downloads (EDD)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected5,096 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP246556304,485
JavaScript388112559
CSS20452

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity59.50
▷ Minimum class complexity1.00
▷ Maximum class complexity435.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods185
▷ Static methods31.62%
▷ Public methods17896.22%
▷ Protected methods00.00%
▷ Private methods73.78%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/image/button1.png8.04KB2.70KB▼ 66.37%
public/images/paypal.png7.42KB3.34KB▼ 54.94%
admin/image/button2.png7.52KB4.76KB▼ 36.65%