93% smart-paypal-checkout-for-woocommerce

Code Review | Smart PayPal Checkout For WooCommerce

WordPress plugin Smart PayPal Checkout For WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: smart-paypal-chec...
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 14, 2020
  • Latest release: Mar 18, 2022
  • Number of updates: 47
  • Update frequency: every 11.1 days
  • Top authors: mbjtech (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

700+ active / 8,268 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.02MB] [CPU: ▼305.28ms] Passed 4 tests

An overview of server-side resources used by Smart PayPal Checkout For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.40 ▲0.18
Dashboard /wp-admin3.41 ▲0.0135.28 ▼0.22
Posts /wp-admin/edit.php3.65 ▲0.0144.57 ▲4.67
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.67 ▼1,216.98
Media Library /wp-admin/upload.php3.30 ▼0.0028.34 ▼4.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Smart PayPal Checkout For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.88 ▲0.275.99 ▲0.212.18 ▼0.55
Dashboard /wp-admin2,892 ▲316.08 ▼0.08113.80 ▼17.84150.95 ▼12.91
Posts /wp-admin/edit.php2,691 ▼33.24 ▲0.0061.33 ▼2.81139.59 ▼2.37
Add New Post /wp-admin/post-new.php1,719 ▲217.51 ▼3.67431.31 ▲0.30158.77 ▼3.79
Media Library /wp-admin/upload.php1,698 ▼05.48 ▼0.00146.31 ▲6.11187.07 ▼4.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Form_Handler' not found in wp-content/plugins/smart-paypal-checkout-for-woocommerce/includes/class-smart-paypal-checkout-for-woocommerce-product.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/smart-paypal-checkout-for-woocommerce/includes/class-smart-paypal-checkout-for-woocommerce-request.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/smart-paypal-checkout-for-woocommerce/includes/class-smart-paypal-checkout-for-woocommerce-gateway.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can take inspiration from this readme.txt

smart-paypal-checkout-for-woocommerce/smart-paypal-checkout-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "Smart PayPal Checkout For WooCommerce" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("5.3" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected7,591 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP214031136,224
JavaScript101701,194
CSS230106
Markdown161067

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity62.06
▷ Minimum class complexity1.00
▷ Maximum class complexity381.00
Average method complexity5.81
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods216
▷ Static methods136.02%
▷ Public methods20795.83%
▷ Protected methods00.00%
▷ Private methods94.17%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants9
▷ Global constants9100.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
No PNG files were detected