90% linepay-wc

Code Review | LINE Pay for WooCommerce

WordPress plugin LINE Pay for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: linepay-wc
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Nov 1, 2019
  • Latest release: Oct 17, 2021
  • Number of updates: 33
  • Update frequency: every 21.9 days
  • Top authors: shohei.tanaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,449 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: ▼5.47ms] Passed 4 tests

An overview of server-side resources used by LINE Pay for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.47 ▲0.54
Dashboard /wp-admin3.32 ▲0.0244.38 ▼7.98
Posts /wp-admin/edit.php3.37 ▲0.0148.03 ▲1.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.90 ▼16.00
Media Library /wp-admin/upload.php3.24 ▲0.0134.79 ▲3.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for LINE Pay for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.38 ▲0.221.83 ▲0.1943.26 ▲3.58
Dashboard /wp-admin2,206 ▲295.53 ▼0.0079.59 ▼10.1840.20 ▼3.64
Posts /wp-admin/edit.php2,112 ▲122.03 ▲0.0439.04 ▲1.6738.08 ▲1.38
Add New Post /wp-admin/post-new.php1,544 ▲1618.13 ▼4.99629.05 ▼54.2565.75 ▲9.50
Media Library /wp-admin/upload.php1,405 ▲84.14 ▼0.0795.21 ▼5.5040.67 ▼3.50

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

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
6 plugin tags: e-commerce, payment, japanese, woocommerce, paidy...

linepay-wc/linepay-wc.php Passed 13 tests

The main file in "LINE Pay for WooCommerce" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
Line Pay for WooCommerce

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
No dangerous file extensions were detected1,553 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP91857391,543
CSS20010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity34.67
▷ Minimum class complexity3.00
▷ Maximum class complexity76.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods79
▷ Static methods22.53%
▷ Public methods7392.41%
▷ Protected methods00.00%
▷ Private methods67.59%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/linepay_white.png2.91KB1.61KB▼ 44.69%
assets/images/linepay_logo.png0.86KB0.57KB▼ 33.98%