89% yoopay-woocommerce-gateway

Code Review | Yoopay - WooCommerce Gateway

WordPress plugin Yoopay - WooCommerce Gateway scored89%from 54 tests.

About plugin

  • Plugin page: yoopay-woocommerc...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9
  • WordPress version: 6.3.1
  • First release: Apr 12, 2016
  • Latest release: Mar 30, 2018
  • Number of updates: 39
  • Update frequency: every 18.6 days
  • Top authors: yoopay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,141 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by Yoopay - WooCommerce Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.54 ▼7.09
Dashboard /wp-admin3.32 ▲0.0148.46 ▼6.14
Posts /wp-admin/edit.php3.37 ▲0.0148.35 ▼0.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.82 ▼9.03
Media Library /wp-admin/upload.php3.24 ▲0.0135.32 ▼4.95

Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/yoopay-woocommerce-gateway/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yoopay - WooCommerce Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.30 ▼1.071.62 ▼0.3740.08 ▼5.53
Dashboard /wp-admin2,224 ▲215.86 ▲0.9596.37 ▼18.0741.53 ▼1.61
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0136.37 ▲0.2238.39 ▲4.39
Add New Post /wp-admin/post-new.php1,526 ▼517.31 ▼5.93694.74 ▼15.0951.02 ▼4.85
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.07106.15 ▼9.9348.96 ▼0.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: gateway, yoopay, payment, woocommerce

yoopay-woocommerce-gateway/woocommerce-yoopay.php 85% from 13 tests

The main PHP file in "Yoopay - WooCommerce Gateway" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yoopay-woocommerce-gateway.php" instead of "woocommerce-yoopay.php")

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 detected1,079 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3119363601
PO File3177177478

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.33
▷ Minimum class complexity2.00
▷ Maximum class complexity34.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods920.00%
▷ Public methods3577.78%
▷ Protected methods1022.22%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/yoopay-setup.png129.50KB47.26KB▼ 63.50%