84% dc-easy-paypal-payment-donations

Code Review | DC - Easy Wordpress Paypal Payment/ Donations Plugin

WordPress plugin DC - Easy Wordpress Paypal Payment/ Donations Plugin scored84%from 54 tests.

About plugin

  • Plugin page: dc-easy-paypal-pa...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: May 29, 2015
  • Latest release: Mar 7, 2018
  • Number of updates: 9
  • Update frequency: every 112.7 days
  • Top authors: dattardwp-21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /927 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.04ms] Passed 4 tests

An overview of server-side resources used by DC - Easy Wordpress Paypal Payment/ Donations Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.33 ▼0.69
Dashboard /wp-admin3.31 ▼0.0347.76 ▼12.26
Posts /wp-admin/edit.php3.36 ▲0.0145.24 ▼1.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.69 ▼13.93
Media Library /wp-admin/upload.php3.23 ▲0.0036.02 ▼0.33

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

DC - Easy Wordpress Paypal Payment/ Donations Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.34 ▼0.021.71 ▼0.1041.88 ▼2.32
Dashboard /wp-admin2,197 ▲175.62 ▼0.0785.12 ▼5.7639.46 ▲2.71
Posts /wp-admin/edit.php2,102 ▲21.98 ▼0.0239.71 ▲1.4930.98 ▼6.79
Add New Post /wp-admin/post-new.php1,528 ▼023.23 ▲0.34622.64 ▲22.5361.21 ▼13.19
Media Library /wp-admin/upload.php1,396 ▼14.22 ▲0.01109.98 ▲6.3048.17 ▲4.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/dc-easy-paypal-payment-donations/wp-paypal-module.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dc-easy-paypal-payment-donations/wp-paypal-module.php:14

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

dc-easy-paypal-payment-donations/wp-paypal-module.php 92% from 13 tests

The main PHP script in "DC - Easy Wordpress Paypal Payment/ Donations Plugin" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dc-easy-paypal-payment-donations.php" instead of "wp-paypal-module.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin314 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1712169
JavaScript100142
CSS1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paypal.png0.55KB0.64KB0.00%