68% avishi-wp-paypal-payment-button

Code Review | Avishi WP PayPal Payment Button

WordPress plugin Avishi WP PayPal Payment Button scored 68% from 54 tests.

About plugin

  • Plugin page: avishi-wp-paypal-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2012
  • Latest release: Feb 15, 2013
  • Number of updates: 13
  • Update frequency: every 10.8 days
  • Top authors: Avishika (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 4,873 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▼0.91MB] [CPU: ▼32.93ms] Passed 4 tests

Analyzing server-side resources used by Avishi WP PayPal Payment Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.77 ▼2.34
Dashboard /wp-admin3.03 ▼0.2724.43 ▼22.26
Posts /wp-admin/edit.php3.03 ▼0.3222.12 ▼23.05
Add New Post /wp-admin/post-new.php3.03 ▼2.8523.63 ▼70.46
Media Library /wp-admin/upload.php3.03 ▼0.1921.78 ▼15.94
Avishi PayPal Payment /wp-admin/options-general.php?page=avishi-wp-paypal-payment-button/index.php3.0423.30

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 12 new options
New WordPress options
db_upgraded
avishi_payment_email
avishi_payment_currency
widget_recent-posts
avishi_payment_button_type
can_compress_scripts
widget_theysaidso_widget
avishi_paypal_environment
avishi_sanbox_link
avishi_live_link
...

Browser metrics Passed 4 tests

Avishi WP PayPal Payment Button: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.20 ▼1.181.70 ▼0.1842.21 ▲2.03
Dashboard /wp-admin2,215 ▲354.90 ▼0.07103.70 ▼10.5436.20 ▼3.25
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0437.38 ▼0.0630.84 ▼5.16
Add New Post /wp-admin/post-new.php1,533 ▲1423.15 ▼0.28618.97 ▲0.5653.94 ▲0.82
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0597.38 ▼3.5742.28 ▼2.71
Avishi PayPal Payment /wp-admin/options-general.php?page=avishi-wp-paypal-payment-button/index.php1,0052.0726.5338.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • 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)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=avishi-wp-paypal-payment-button/index.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avishi-wp-paypal-payment-button/index.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: simple paypal paynow or buynow button, paypal sandbox option for testing your button, paypal pay nowbuy now button for product or services, paypal payment

avishi-wp-paypal-payment-button/index.php 92% from 13 tests

The main file in "Avishi WP PayPal Payment Button" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("avishi-wp-paypal-payment-button.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected202 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17633176
CSS17126

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin