84% skt-paypal-for-woocommerce

Code Review | SKT PayPal for WooCommerce

WordPress plugin SKT PayPal for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: skt-paypal-for-wo...
  • Plugin version: 1.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 16, 2022
  • Latest release: Mar 30, 2022
  • Number of updates: 8
  • Update frequency: every 5.4 days
  • Top authors: sonalsinha21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /795 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by SKT PayPal for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.97 ▼6.59
Dashboard /wp-admin3.31 ▲0.0142.13 ▼11.91
Posts /wp-admin/edit.php3.36 ▲0.0146.12 ▲0.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.64 ▼12.39
Media Library /wp-admin/upload.php3.23 ▲0.0133.14 ▼2.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SKT PayPal for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.57 ▼0.801.84 ▼0.0241.37 ▼3.44
Dashboard /wp-admin2,212 ▲275.95 ▲0.0798.91 ▼18.0038.01 ▼8.85
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0140.72 ▲1.2535.93 ▲2.75
Add New Post /wp-admin/post-new.php1,520 ▲117.56 ▼5.62674.66 ▲8.7042.68 ▼9.30
Media Library /wp-admin/upload.php1,397 ▲64.27 ▲0.0695.95 ▲1.2442.33 ▲1.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/skt-paypal-for-woocommerce/backend/paypal-checkout.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: store, payment gateway, paypal, payments, woocommerce

skt-paypal-for-woocommerce/skt-paypal-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "SKT PayPal for WooCommerce" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected450 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31718449
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/paypal.png2.05KB0.83KB▼ 59.65%