84% wp-ecommerce-paypal

Code Review | Easy PayPal & Stripe Buy Now Button

WordPress plugin Easy PayPal & Stripe Buy Now Button scored84%from 54 tests.

About plugin

  • Plugin page: wp-ecommerce-paypal
  • Plugin version: 1.8.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 3, 2015
  • Latest release: Nov 3, 2023
  • Number of updates: 106
  • Update frequency: every 30.4 days
  • Top authors: scottpaterson (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

20,000+ active /251,549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼4.23ms] Passed 4 tests

A check of server-side resources used by Easy PayPal & Stripe Buy Now Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3342.43 ▲1.41
Dashboard /wp-admin3.63 ▲0.3346.52 ▼2.35
Posts /wp-admin/edit.php3.74 ▲0.3949.07 ▲2.51
Add New Post /wp-admin/post-new.php6.23 ▲0.3481.77 ▼18.49
Media Library /wp-admin/upload.php3.55 ▲0.3251.97 ▲17.61

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
wpecpp_settings
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Easy PayPal & Stripe Buy Now Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,047 ▲30016.21 ▲1.91192.94 ▲191.2347.46 ▼0.05
Dashboard /wp-admin2,268 ▲905.64 ▼0.0794.34 ▼8.9640.01 ▼1.17
Posts /wp-admin/edit.php2,173 ▲732.15 ▲0.2042.67 ▲4.9339.71 ▲6.31
Add New Post /wp-admin/post-new.php1,585 ▲5623.30 ▲0.13687.49 ▼7.0156.09 ▼1.93
Media Library /wp-admin/upload.php1,473 ▲764.17 ▲0.00108.83 ▲9.2545.34 ▲4.05

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • wpecpp_settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-ecommerce-paypal/wp-ecommerce-paypal.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: ecommerce, gateway, shop, paypal button, paypal

wp-ecommerce-paypal/wp-ecommerce-paypal.php Passed 13 tests

"Easy PayPal & Stripe Buy Now Button" version 1.8.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
132 characters long description:
Add a PayPal or Stripe Buy Now Button to your website and start selling today. No Coding Required. Official PayPal & Stripe Partner.

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
Everything looks great! No dangerous files found in this plugin3,263 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP102911682,539
CSS2265538
JavaScript2260154
SVG30132

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions45
▷ Named functions4497.78%
▷ Anonymous functions12.22%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/paypal-recommended.png0.55KB0.39KB▼ 29.73%
assets/images/paypal-accept-paypal.png1.58KB1.04KB▼ 34.22%
assets/images/paypal-advanced.png8.45KB3.54KB▼ 58.07%
assets/images/paypal-express.png5.46KB2.48KB▼ 54.68%
assets/images/paypal-accept-cards.png4.63KB2.68KB▼ 42.16%