89% yith-paypal-express-checkout-for-woocommerce

Code Review | YITH PayPal Express Checkout for WooCommerce

WordPress plugin YITH PayPal Express Checkout for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: yith-paypal-expre...
  • Plugin version: 1.32.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 8.1-6.4
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Nov 27, 2023
  • Number of updates: 154
  • Update frequency: every 12.8 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active /103,522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by YITH PayPal Express Checkout for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.88 ▼1.16
Dashboard /wp-admin3.33 ▼0.0245.69 ▼13.14
Posts /wp-admin/edit.php3.38 ▲0.0249.30 ▼0.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.46 ▼16.03
Media Library /wp-admin/upload.php3.25 ▲0.0231.78 ▼4.64

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 314 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for YITH PayPal Express Checkout for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.67 ▲0.311.76 ▲0.0943.83 ▲0.34
Dashboard /wp-admin2,204 ▲375.61 ▼0.0694.18 ▼16.9342.36 ▼4.67
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0339.43 ▼0.7637.20 ▲1.35
Add New Post /wp-admin/post-new.php1,532 ▲323.06 ▼0.32654.16 ▲47.8256.83 ▲8.43
Media Library /wp-admin/upload.php1,409 ▲94.18 ▲0.0194.50 ▼1.8942.19 ▲0.56

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: recurring payments, gateways, yith, paypal, gateway paypal...

yith-paypal-express-checkout-for-woocommerce/init.php 77% from 13 tests

This is the main PHP file of "YITH PayPal Express Checkout for WooCommerce" version 1.32.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:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.2" instead of "8.1")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yith-paypal-express-checkout-for-woocommerce.php" instead of "init.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 320 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
No dangerous file extensions were detected43,945 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
PHP1803,3536,97517,419
JavaScript491,3508299,427
CSS181,6582439,165
PO File71,7942,2144,960
SVG8012,926
XML212948

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity41.78
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes41
▷ Abstract classes24.88%
▷ Concrete classes3995.12%
▷ Final classes00.00%
Methods538
▷ Static methods5910.97%
▷ Public methods42278.44%
▷ Protected methods9016.73%
▷ Private methods264.83%
Functions141
▷ Named functions13394.33%
▷ Anonymous functions85.67%
Constants17
▷ Global constants1694.12%
▷ Class constants15.88%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
29 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-fw/assets/images/sidebar-left.png0.95KB0.11KB▼ 87.91%
plugin-fw/assets/images/banner-premium.png10.78KB5.54KB▼ 48.66%
plugin-fw/assets/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/images/spinner.png0.15KB0.14KB▼ 5.88%
plugin-fw/assets/images/colorbox/border1.png0.61KB0.82KB0.00%