89% flywire-payment-gateway

Code Review | Flywire for WooCommerce

WordPress plugin Flywire for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: flywire-payment-g...
  • Plugin version: 1.0.8
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2021
  • Latest release: May 3, 2023
  • Number of updates: 24
  • Update frequency: every 27.0 days
  • Top authors: taiflywire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.99ms] Passed 4 tests

An overview of server-side resources used by Flywire for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.86 ▼1.44
Dashboard /wp-admin3.41 ▲0.0751.99 ▼15.50
Posts /wp-admin/edit.php3.53 ▲0.1753.03 ▼0.39
Add New Post /wp-admin/post-new.php5.99 ▲0.1197.22 ▼6.61
Media Library /wp-admin/upload.php3.34 ▲0.1137.08 ▲1.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Flywire for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.83 ▲0.661.82 ▲0.1943.06 ▲3.70
Dashboard /wp-admin2,209 ▲214.86 ▼1.04104.66 ▼4.6039.90 ▼4.89
Posts /wp-admin/edit.php2,086 ▼62.02 ▲0.0236.41 ▼2.1033.48 ▼1.59
Add New Post /wp-admin/post-new.php1,538 ▲823.25 ▲4.83656.85 ▲13.6450.21 ▲0.91
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0197.47 ▼4.4943.63 ▼1.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
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 shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Configuration page), #2 (Select Flywire payment method)
Please take inspiration from this readme.txt

flywire-payment-gateway/flywire-payment-gateway.php 92% from 13 tests

The main file in "Flywire for WooCommerce" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder was not found ("/i18n/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected861 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4207523826
JavaScript12533
Markdown1102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods37.69%
▷ Public methods1948.72%
▷ Protected methods1948.72%
▷ Private methods12.56%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.58MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png330.40KB133.55KB▼ 59.58%
assets/flywire_f.png1.62KB1.61KB▼ 0.54%
assets/screenshot-2.png262.78KB113.82KB▼ 56.68%