99% wc-remise-gateway

Code Review | Payment Gateway Remise for WooCommerce

WordPress plugin Payment Gateway Remise for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: wc-remise-gateway
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.1
  • WordPress version: 5.8.1
  • First release: Apr 22, 2021
  • Latest release: Apr 22, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: Hiroaki Miyashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 99 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼142.01ms] Passed 4 tests

A check of server-side resources used by Payment Gateway Remise for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0836.73 ▼3.55
Dashboard /wp-admin3.14 ▲0.0849.62 ▲7.61
Posts /wp-admin/edit.php3.20 ▲0.0845.33 ▼3.35
Add New Post /wp-admin/post-new.php5.50 ▲0.0699.43 ▼560.64
Media Library /wp-admin/upload.php3.09 ▲0.0835.56 ▼0.51

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Gateway Remise for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11716.24 ▲0.288.18 ▼2.2945.29 ▼7.06
Dashboard /wp-admin2,983 ▲496.02 ▲0.07140.41 ▼11.72117.87 ▼3.58
Posts /wp-admin/edit.php2,749 ▲102.68 ▼0.0074.54 ▼2.2694.45 ▼5.68
Add New Post /wp-admin/post-new.php3,643 ▲2,03915.01 ▼3.83467.38 ▲67.74116.84 ▼7.25
Media Library /wp-admin/upload.php1,817 ▲104.99 ▼0.09168.30 ▲9.57122.55 ▼10.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Remise - Settings) image not found
Please take inspiration from this readme.txt

wc-remise-gateway/wc-remise-gateway.php 77% from 13 tests

The primary PHP file in "Payment Gateway Remise for WooCommerce" version 0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.4")
  • Domain Path: The domain path must begin with a forward slash character ("//")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin564 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16515378
PO File11,5383,305186

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.00
▷ Minimum class complexity5.00
▷ Maximum class complexity31.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity18.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%
Functions4
▷ Named functions4100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png43.26KB18.00KB▼ 58.38%