10% paypal-link-sale

Code Review | Paypal Sell Link Ads

WordPress plugin Paypal Sell Link Ads scored10%from 54 tests.

About plugin

  • Plugin page: paypal-link-sale
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2014
  • Latest release: Jul 21, 2015
  • Number of updates: 14
  • Update frequency: every 26.3 days
  • Top authors: sunnyverma1984 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /5,406 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/paypal-link-sale/widget.php+93
    Function create_function() is deprecated

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

A check of server-side resources used by Paypal Sell Link Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.45 ▼35.58
Dashboard /wp-admin2.06 ▼1.246.29 ▼42.12
Posts /wp-admin/edit.php2.06 ▼1.295.45 ▼42.26
Add New Post /wp-admin/post-new.php2.06 ▼3.825.16 ▼91.73
Media Library /wp-admin/upload.php2.06 ▼1.174.87 ▼30.46
Paypal Link Sale /wp-admin/admin.php?page=ppls-stats2.065.41
Settings /wp-admin/admin.php?page=ppls-settings2.066.05

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: 2 new tables, 14 new options
New tables
wp_pplsorders
wp_pplsipn
New WordPress options
ppls_size
ppls_term
ppls_price
ppls_total
can_compress_scripts
ppls_currency
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Paypal Sell Link Ads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12014.46 ▲0.081.86 ▲0.1947.60 ▲4.98
Dashboard /wp-admin2,262 ▲825.58 ▼0.0796.02 ▲8.7680.26 ▲35.76
Posts /wp-admin/edit.php2,132 ▲352.00 ▼0.0235.05 ▼2.0234.24 ▲1.21
Add New Post /wp-admin/post-new.php1,573 ▲4722.88 ▼0.35706.18 ▲27.6748.93 ▼10.37
Media Library /wp-admin/upload.php1,437 ▲344.20 ▼0.0193.43 ▼9.1264.71 ▲21.88
Paypal Link Sale /wp-admin/admin.php?page=ppls-stats8561.6523.2924.86
Settings /wp-admin/admin.php?page=ppls-settings9802.1826.0123.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/paypal-link-sale/widget.php+93
    Function create_function() is deprecated
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_pplsipn
    • wp_pplsorders
  • The uninstall procedure has failed, leaving 14 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • ppls_price
    • ppls_size
    • can_compress_scripts
    • widget_recent-posts
    • ppls_term
    • widget_ppls_widget
    • ppls_email
    • db_upgraded
    • ...

Smoke tests 50% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ppls-settings
    • > Deprecated in wp-content/plugins/paypal-link-sale/widget.php+93
    Function create_function() is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/paypal-link-sale/pages/form.php:2
    • > PHP Notice
      Undefined variable: pp_url in wp-content/plugins/paypal-link-sale/ipn.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/paypal-link-sale/pages/thankyou.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/paypal-link-sale/paypal-link-sale.php:83
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/paypal-link-sale/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paypal-link-sale/admin-menu.php:164
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/paypal-link-sale/pages/payment.php on line 4
    • > PHP Notice
      Undefined index: ppls_id in wp-content/plugins/paypal-link-sale/pages/payment.php on line 2
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/paypal-link-sale/pages/form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/paypal-link-sale/pages/payment.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt is a good inspiration

paypal-link-sale/paypal-link-sale.php 92% from 13 tests

The primary PHP file in "Paypal Sell Link Ads" version 1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected826 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP71057565
PO File16080145
CSS210104
JavaScript11112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paypal.png1.09KB0.89KB▼ 18.50%