78% tron-payment-button-for-paypal

Code Review | Tron Payment Button for PayPal

WordPress plugin Tron Payment Button for PayPal scored 78% from 54 tests.

About plugin

  • Plugin page: tron-payment-butt...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 9, 2023
  • Latest release: May 9, 2023
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: tronusa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 79 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Tron Payment Button for PayPal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.04 ▼2.55
Dashboard /wp-admin3.32 ▲0.0246.03 ▼1.35
Posts /wp-admin/edit.php3.37 ▲0.0146.20 ▲3.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.60 ▼8.55
Media Library /wp-admin/upload.php3.24 ▲0.0134.61 ▼1.38

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Tron Payment Button for PayPal
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.101.59 ▼0.2041.41 ▼2.91
Dashboard /wp-admin2,203 ▲185.88 ▼0.0299.20 ▼3.3042.58 ▼1.75
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0433.32 ▼1.0033.84 ▲1.24
Add New Post /wp-admin/post-new.php1,533 ▼923.25 ▲5.03665.74 ▲64.1156.79 ▼5.46
Media Library /wp-admin/upload.php1,388 ▲64.26 ▼0.0296.83 ▼0.9243.76 ▼0.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tron-payment-button-for-paypal/config.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tron-payment-button-for-paypal/row_meta.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tron-payment-button-for-paypal/shortcodes.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tron-payment-button-for-paypal/row_meta.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: payment button, easy button pay

tron-payment-button-for-paypal/_.paypal_button.php 92% from 13 tests

"Tron Payment Button for PayPal" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tron-payment-button-for-paypal.php" instead of "_.paypal_button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin89 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5143289

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions2
▷ Named functions2100.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png17.06KB15.84KB▼ 7.17%
assets/icon-128x128.png3.97KB3.21KB▼ 19.08%