89% wc-gmopg-gateway

Code Review | Payment Gateway GMOPG for WooCommerce

WordPress plugin Payment Gateway GMOPG for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: wc-gmopg-gateway
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2022
  • Latest release: Dec 7, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Hiroaki Miyashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Payment Gateway GMOPG for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.18 ▼3.36
Dashboard /wp-admin3.31 ▲0.0148.23 ▼1.63
Posts /wp-admin/edit.php3.43 ▲0.0746.89 ▲0.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.62 ▼6.62
Media Library /wp-admin/upload.php3.24 ▲0.0135.98 ▲3.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway GMOPG for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.56 ▼1.061.91 ▲0.1243.69 ▼5.57
Dashboard /wp-admin2,208 ▲205.84 ▲0.96101.16 ▼14.3540.11 ▼7.90
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0235.15 ▼0.1233.05 ▼3.69
Add New Post /wp-admin/post-new.php1,531 ▲1123.43 ▲0.10632.71 ▼35.9755.11 ▼9.37
Media Library /wp-admin/upload.php1,396 ▲54.24 ▲0.0096.59 ▼2.2441.04 ▼2.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (GMOPG - Settings)
You can take inspiration from this readme.txt

wc-gmopg-gateway/wc-gmopg-gateway.php 85% from 13 tests

"Payment Gateway GMOPG for WooCommerce" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("//")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/")

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
No dangerous file extensions were detected2,516 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1366282,198
PO File11,6023,441318

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity20.86
▷ Minimum class complexity14.00
▷ Maximum class complexity110.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods59100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png51.88KB22.63KB▼ 56.37%