68% ryans-payment-button

Code Review | Ryan's Payment Button

WordPress plugin Ryan's Payment Button scored68%from 54 tests.

About plugin

  • Plugin page: ryans-payment-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Oct 13, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: rmcfadden25 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /818 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.84MB] [CPU: ▼28.40ms] Passed 4 tests

Analyzing server-side resources used by Ryan's Payment Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.01 ▼1.44
Dashboard /wp-admin3.10 ▼0.2126.41 ▼18.96
Posts /wp-admin/edit.php3.10 ▼0.2626.97 ▼20.22
Add New Post /wp-admin/post-new.php3.10 ▼2.7926.25 ▼63.55
Media Library /wp-admin/upload.php3.10 ▼0.1322.55 ▼10.87
Ryan's Payment Button /wp-admin/options-general.php?page=ryans_payment_button3.1024.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
ryans_payment_button_options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Ryan's Payment Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.95 ▼0.435.34 ▲3.5842.00 ▼0.95
Dashboard /wp-admin2,213 ▲285.85 ▲0.0696.59 ▼16.1339.39 ▼6.64
Posts /wp-admin/edit.php2,102 ▲132.04 ▲0.0339.35 ▲2.3136.00 ▲3.32
Add New Post /wp-admin/post-new.php1,523 ▼1023.06 ▲0.07665.82 ▲2.0148.93 ▼3.31
Media Library /wp-admin/upload.php1,398 ▲164.23 ▲0.0797.29 ▲0.5344.42 ▲2.17
Ryan's Payment Button /wp-admin/options-general.php?page=ryans_payment_button1,2691.8029.1328.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/ryans-payment-button/ryans-payment-button.php+209
    A non-numeric value encountered
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ryans_payment_button
    • > Warning in wp-content/plugins/ryans-payment-button/ryans-payment-button.php+209
    A non-numeric value encountered

SRP 50% 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 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/ryans-payment-button/ryans-payment-button.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: paypal, buttons

ryans-payment-button/ryans-payment-button.php Passed 13 tests

The main file in "Ryan's Payment Button" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
123 characters long description:
Add a paypal button to your wordpress site with an a optional payment amount textbox. Choose from multiple paypal buttons.

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 detected409 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP29215388
JavaScript29017
CSS1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.14MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/screenshot-2.png28.58KB0.00KB▼ 100.00%
(invalid) assets/screenshot-3.png76.01KB0.00KB▼ 100.00%
assets/icon-256x256.png9.33KB4.22KB▼ 54.72%
(invalid) assets/screenshot-1.png29.40KB0.00KB▼ 100.00%