78% advanced-forms-paypal-payment-buttons

Code Review | Advanced Forms PayPal Payment Buttons

WordPress plugin Advanced Forms PayPal Payment Buttons scored78%from 54 tests.

About plugin

  • Plugin page: advanced-forms-pa...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2018
  • Latest release: Jan 5, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: demotic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /883 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 gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼1.41ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Forms PayPal Payment Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2942.74 ▼4.54
Dashboard /wp-admin3.58 ▲0.2851.51 ▼4.13
Posts /wp-admin/edit.php3.70 ▲0.3453.29 ▲3.69
Add New Post /wp-admin/post-new.php6.16 ▲0.28101.63 ▲0.77
Media Library /wp-admin/upload.php3.50 ▲0.2839.22 ▲2.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Advanced Forms PayPal Payment Buttons: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.18 ▼0.181.76 ▼0.2340.99 ▼5.02
Dashboard /wp-admin2,216 ▲365.55 ▼0.0488.88 ▼8.3941.73 ▲2.25
Posts /wp-admin/edit.php2,128 ▲282.18 ▲0.1541.07 ▲2.7835.39 ▼1.62
Add New Post /wp-admin/post-new.php1,545 ▲923.05 ▲4.68643.60 ▼9.3454.27 ▼22.99
Media Library /wp-admin/upload.php1,421 ▲244.27 ▲0.13102.86 ▼5.5142.98 ▼3.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advanced-forms-paypal-payment-buttons/public/partials/advanced-forms-paypal-payment-buttons-public-redirect.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/advanced-forms-paypal-payment-buttons/public/partials/advanced-forms-paypal-payment-buttons-public-redirect.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/advanced-forms-paypal-payment-buttons/admin/partials/advanced-forms-paypal-payment-buttons-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

advanced-forms-paypal-payment-buttons/advanced-forms-paypal-payment-buttons.php Passed 13 tests

The entry point to "Advanced Forms PayPal Payment Buttons" version 1.0.0 is a PHP file that has certain tags in its header comment area
90 characters long description:
Create PayPal Payment Buttons with the power of Advanced Forms and Advanced Custom Fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,941 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP132255891,904
CSS10635
Markdown1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.14
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2275.86%
▷ Protected methods00.00%
▷ Private methods724.14%
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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png4.19KB2.41KB▼ 42.52%
assets/icon-256x256.png8.68KB4.20KB▼ 51.59%