90% payscout-woocommerce

Code Review | Payscout Payment Gateway for WooCommerce

WordPress plugin Payscout Payment Gateway for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: payscout-woocommerce
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2016
  • Latest release: Mar 15, 2016
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: payscout (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 550 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.31ms] Passed 4 tests

An overview of server-side resources used by Payscout Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.43 ▼1.96
Dashboard /wp-admin3.36 ▲0.0546.71 ▼6.62
Posts /wp-admin/edit.php3.41 ▲0.0546.05 ▲0.88
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.74 ▼5.52
Media Library /wp-admin/upload.php3.28 ▲0.0538.00 ▲4.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Payscout Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.111.76 ▼0.0548.69 ▼3.63
Dashboard /wp-admin2,206 ▲184.89 ▼0.9797.91 ▼5.2837.88 ▼1.59
Posts /wp-admin/edit.php2,092 ▲61.99 ▼0.0836.05 ▼1.9530.67 ▼0.51
Add New Post /wp-admin/post-new.php1,534 ▲123.23 ▲0.09597.59 ▼12.6457.69 ▼10.66
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.05100.49 ▼5.2639.77 ▼4.46

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

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

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 smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot-1 - Merchant Username), #2 (Screenshot-2 - Admin Settings of Plugin), #3 (Screenshot-3 - Checkout Page Form), #4 (Screenshot-4 - Admin order details)
The official readme.txt is a good inspiration

payscout-woocommerce/payscout-woocommerce.php Passed 13 tests

The primary PHP file in "Payscout Payment Gateway for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
107 characters long description:
This plugin adds a payment option in WooCommerce for customers to pay with their Credit Cards Via Payscout.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin286 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16324286

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.15MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/discover.png1.45KB1.26KB▼ 12.83%
images/jcb.png1.51KB1.31KB▼ 13.60%
screenshot-2.png35.17KB16.26KB▼ 53.77%
images/amex.png2.06KB1.42KB▼ 31.30%
images/payscout.png10.52KB4.46KB▼ 57.60%