72% iamport-payment

Code Review | 아임포트 결제버튼 생성 플러그인

WordPress plugin 아임포트 결제버튼 생성 플러그인 scored72%from 54 tests.

About plugin

  • Plugin page: iamport-payment
  • Plugin version: 1.1.19
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2015
  • Latest release: Jul 7, 2021
  • Number of updates: 208
  • Update frequency: every 9.8 days
  • Top authors: movingcart (60.1%)mymusese (38.94%)iamport (1.92%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,690 total downloads

Benchmarks

Plugin footprint 83% 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.30MB] [CPU: ▼4.75ms] Passed 4 tests

This is a short check of server-side resources used by 아임포트 결제버튼 생성 플러그인
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3440.59 ▼3.20
Dashboard /wp-admin3.64 ▲0.3052.72 ▼13.85
Posts /wp-admin/edit.php3.69 ▲0.3450.69 ▼2.10
Add New Post /wp-admin/post-new.php6.17 ▲0.2899.95 ▲0.16
Media Library /wp-admin/upload.php3.50 ▲0.2743.07 ▲4.68
아임포트 결제목록 /wp-admin/edit.php?post_type=iamport_payment3.6153.54
아임포트 숏코드 메뉴얼 /wp-admin/edit.php?post_type=iamport_payment&page=iamport-shortcode3.5237.16
아임포트 설정 /wp-admin/edit.php?post_type=iamport_payment&page=iamport-config3.5336.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
iamport_setting
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for 아임포트 결제버튼 생성 플러그인
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲22414.24 ▼0.0314.77 ▲12.6542.00 ▼3.56
Dashboard /wp-admin2,237 ▲305.88 ▲0.93104.05 ▼13.1697.02 ▲50.14
Posts /wp-admin/edit.php2,137 ▲372.16 ▲0.0338.24 ▲1.1743.64 ▲8.43
Add New Post /wp-admin/post-new.php1,706 ▲16122.42 ▼0.66666.63 ▲4.4863.16 ▼8.05
Media Library /wp-admin/upload.php1,428 ▲284.25 ▲0.02111.74 ▲2.4499.28 ▲53.10
아임포트 결제목록 /wp-admin/edit.php?post_type=iamport_payment1,1231.9434.0173.86
아임포트 숏코드 메뉴얼 /wp-admin/edit.php?post_type=iamport_payment&page=iamport-shortcode1,5242.0227.63205.60
아임포트 설정 /wp-admin/edit.php?post_type=iamport_payment&page=iamport-config1,4132.0627.5468.54

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 does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • iamport_setting
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 29 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=iamport_payment&page=iamport-config
    • > Notice in wp-content/plugins/iamport-payment/view/admin/setting.php+216
    Trying to access array offset on value of type bool
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=iamport_payment&page=iamport-config
    • > Notice in wp-content/plugins/iamport-payment/view/admin/setting.php+188
    Undefined index: vbank_day_limit
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=iamport_payment&page=iamport-config
    • > Notice in wp-content/plugins/iamport-payment/view/admin/setting.php+200
    Undefined index: card_max_quota

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/iamport-payment/view/modal/background.php
  • 29× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/iamport-payment/view/history/thankyou-success.php on line 4
    • > PHP Notice
      Undefined variable: iamport_result in wp-content/plugins/iamport-payment/view/history/thankyou-success.php on line 4
    • > PHP Notice
      Undefined variable: order_status in wp-content/plugins/iamport-payment/view/admin/edit-order.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/iamport-payment/view/modal/payment.php:6
    • > PHP Notice
      Undefined variable: order_view_url in wp-content/plugins/iamport-payment/view/history/thankyou-success.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_style() in wp-content/plugins/iamport-payment/view/admin/setting.php:2
    • > PHP Notice
      Undefined variable: order_view_url in wp-content/plugins/iamport-payment/view/history/thankyou-success.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/iamport-payment/view/admin/edit-order.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/iamport-payment/view/modal/result.php:6
    • > PHP Notice
      Undefined variable: order_view_url in wp-content/plugins/iamport-payment/view/history/thankyou-fail.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === iamport-payment === )
The official readme.txt might help

iamport-payment/IamportPaymentPlugin.php 85% from 13 tests

The primary PHP file in "아임포트 결제버튼 생성 플러그인" version 1.1.19 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 285 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("iamport-payment.php" instead of "IamportPaymentPlugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected3,602 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP19398672,139
JavaScript1625973928
CSS59122492
JSON10026
SVG20217

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.70
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods84
▷ Static methods33.57%
▷ Public methods7488.10%
▷ Protected methods00.00%
▷ Private methods1011.90%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.79MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png58.27KB17.73KB▼ 69.58%
assets/screenshot-3.png308.38KB91.46KB▼ 70.34%
assets/img/tag-1.png0.69KB0.36KB▼ 47.54%
assets/img/tag-5.png0.83KB0.42KB▼ 49.06%
assets/img/file-img.png0.39KB0.49KB0.00%