84% instant-pay-for-woocommerce

Code Review | Instant Pay for Woocommerce

WordPress plugin Instant Pay for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: instant-pay-for-w...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: Feb 4, 2022
  • Number of updates: 4
  • Update frequency: every 36.8 days
  • Top authors: instantpay (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /472 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.00MB] [CPU: ▼9.02ms] Passed 4 tests

This is a short check of server-side resources used by Instant Pay for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.32 ▼2.84
Dashboard /wp-admin3.31 ▲0.0151.19 ▼0.86
Posts /wp-admin/edit.php3.36 ▲0.0050.26 ▼11.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.08 ▼18.96
Media Library /wp-admin/upload.php3.23 ▲0.0038.48 ▼2.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Instant Pay for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.181.78 ▼0.5939.30 ▼3.15
Dashboard /wp-admin2,218 ▲125.83 ▼0.10102.24 ▼8.0535.54 ▼2.18
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0637.14 ▼4.7033.16 ▼2.81
Add New Post /wp-admin/post-new.php1,554 ▲917.90 ▼5.39641.70 ▼62.1074.40 ▲9.03
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.01119.44 ▲10.8250.68 ▲2.02

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-pay-for-woocommerce/includes/views/api_request_headers_html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-pay-for-woocommerce/includes/views/api_atts_html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/instant-pay-for-woocommerce/includes/hooks.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/instant-pay-for-woocommerce/classes/advance_custom_payment_gateway_pro_settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/instant-pay-for-woocommerce/classes/advance_custom_payment_gateway_pro.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #2, #3, #4 in instant-pay-for-woocommerce/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === instant-pay-for-woocommerce === )
The official readme.txt is a good inspiration

instant-pay-for-woocommerce/instant-pay-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Instant Pay for Woocommerce" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
94 characters long description:
Instant Pay for Woocommerce. Capture payments via bank transfer with API Banking in Australia.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected717 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP68342448
CSS190227
JavaScript18642

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.50
▷ Minimum class complexity11.00
▷ Maximum class complexity14.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.42MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png14.64KB6.59KB▼ 54.97%
assets/icon-256x256.png42.17KB16.86KB▼ 60.03%
assets/banner772x250.png116.53KB35.99KB▼ 69.11%
assets/banner1544x500.png252.26KB102.87KB▼ 59.22%