10% wp-smart-paypal-payment-or-donation-accept

Code Review | WordPress Smart Paypal Payment or Donation Accept

WordPress plugin WordPress Smart Paypal Payment or Donation Accept scored 10% from 54 tests.

About plugin

  • Plugin page: wp-smart-paypal-p...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: Oct 21, 2014
  • Number of updates: 6
  • Update frequency: every 8.2 days
  • Top authors: innovativeroots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,413 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/wp-smart-paypal-payment-or-donation-accept.php+135
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.90ms] Passed 4 tests

A check of server-side resources used by WordPress Smart Paypal Payment or Donation Accept
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.43 ▼38.12
Dashboard /wp-admin2.07 ▼1.235.30 ▼46.74
Posts /wp-admin/edit.php2.07 ▼1.285.98 ▼42.66
Add New Post /wp-admin/post-new.php2.07 ▼3.817.03 ▼88.07
Media Library /wp-admin/upload.php2.07 ▼1.164.84 ▼26.40
WP Smart Payment /wp-admin/options-general.php?page=wp_sppd_settings2.075.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 37 new options
New WordPress options
wp_sppd_payment_option_3
can_compress_scripts
wp_sppd_desc
wp_sppd_payment_option_8
wp_sppd_payment_option_price_5
widget_wp_sppd_plugin
wp_sppd_payment_option_6
wp_sppd_amount
wp_sppd_payment_option_2
wp_sppd_payment_option_1
...

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Smart Paypal Payment or Donation Accept
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲15613.56 ▼0.735.62 ▲3.9543.45 ▼3.61
Dashboard /wp-admin2,210 ▲224.86 ▼1.02108.55 ▲5.8239.32 ▼6.83
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0539.20 ▲2.6533.78 ▼2.41
Add New Post /wp-admin/post-new.php1,542 ▲2823.35 ▲5.74784.35 ▲112.2466.91 ▲14.22
Media Library /wp-admin/upload.php1,392 ▲74.20 ▲0.0199.45 ▼7.0743.89 ▲0.20
WP Smart Payment /wp-admin/options-general.php?page=wp_sppd_settings1,2821.7125.4728.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/wp-smart-paypal-payment-or-donation-accept.php+135
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_wp_sppd_plugin
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_sppd_settings
    • > Deprecated in wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/wp-smart-paypal-payment-or-donation-accept.php+135
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=wp_sppd_settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in wp_sppd_plugin is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp_sppd_settings
    • > Notice in wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/includes/page-options.php+54
    Undefined variable: error_found
    • > GET request to /wp-admin/options-general.php?page=wp_sppd_settings
    • > Notice in wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/includes/page-options.php+62
    Undefined variable: success

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/includes/page-options.php
    • > /wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/includes/options.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/includes/options.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=wp_sppd_settings
    • > Network (severe)
    var/www/wordpress/wp-content/plugins/wp-smart-paypal-payment-or-donation-accept/js/wp_sppd_script.js - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-smart-paypal-payment-or-donation-accept/wp-smart-paypal-payment-or-donation-accept.php 92% from 13 tests

The entry point to "WordPress Smart Paypal Payment or Donation Accept" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 217 characters long)

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
Good job! No executable or dangerous file extensions detected430 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33919365
JavaScript22061
CSS2004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/banner-772x250.png223.90KB131.99KB▼ 41.05%
images/screenshot-2.png12.75KB5.77KB▼ 54.75%
images/screenshot-1.png40.77KB18.17KB▼ 55.42%