89% simple-paypal-buynow-button

Code Review | Simple Buy Now Button for PayPal

WordPress plugin Simple Buy Now Button for PayPal scored89%from 54 tests.

About plugin

  • Plugin page: simple-paypal-buy...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Nov 20, 2017
  • Latest release: Jan 7, 2023
  • Number of updates: 18
  • Update frequency: every 104.2 days
  • Top authors: wpcodelibrary (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /9,646 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Simple Buy Now Button for PayPal
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0250.67 ▲9.61
Dashboard /wp-admin3.37 ▼0.0251.16 ▼15.00
Posts /wp-admin/edit.php3.42 ▲0.0247.16 ▼0.35
Add New Post /wp-admin/post-new.php5.95 ▲0.0296.34 ▼0.09
Media Library /wp-admin/upload.php3.29 ▲0.0238.39 ▲0.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Buy Now Button for PayPal
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2813.91 ▼0.281.71 ▼0.1843.32 ▲2.61
Dashboard /wp-admin2,195 ▲185.63 ▼0.0390.39 ▲2.5842.80 ▲4.13
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0033.72 ▼1.4432.02 ▼5.34
Add New Post /wp-admin/post-new.php1,533 ▲523.27 ▲0.06593.32 ▼89.5259.12 ▲7.09
Media Library /wp-admin/upload.php1,397 ▼64.18 ▼0.0396.48 ▼3.3743.60 ▼3.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "#"
Please take inspiration from this readme.txt

simple-paypal-buynow-button/simple-paypal-buynow-button.php 92% from 13 tests

The principal PHP file in "Simple Buy Now Button for PayPal" v. 1.1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected80 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3234880

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin