77% iamport-for-woocommerce

Code Review | iamport-for-woocommerce

WordPress plugin iamport-for-woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: iamport-for-wooco...
  • Plugin version: 2.2.37
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.8.0
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Nov 6, 2023
  • Number of updates: 539
  • Update frequency: every 5.6 days
  • Top authors: movingcart (89.8%)iamport (5.94%)mymusese (3.71%)kdlee93 (1.11%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /57,825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼0.06ms] Passed 4 tests

An overview of server-side resources used by iamport-for-woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2640.74 ▲2.88
Dashboard /wp-admin3.56 ▲0.2649.50 ▲1.35
Posts /wp-admin/edit.php3.68 ▲0.3252.29 ▲6.73
Add New Post /wp-admin/post-new.php6.16 ▲0.2883.81 ▼8.97
Media Library /wp-admin/upload.php3.49 ▲0.2636.87 ▲4.49

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for iamport-for-woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16014.07 ▼0.3311.23 ▲9.5942.61 ▲2.90
Dashboard /wp-admin2,201 ▲205.79 ▲0.1086.79 ▼15.9944.15 ▼0.21
Posts /wp-admin/edit.php2,109 ▲92.28 ▲0.2735.64 ▼5.9040.67 ▲3.21
Add New Post /wp-admin/post-new.php1,535 ▲923.10 ▼0.03688.89 ▲46.9354.00 ▼3.51
Media Library /wp-admin/upload.php1,409 ▲154.38 ▲0.21105.33 ▲5.8344.25 ▲2.71

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/iamport-for-woocommerce/includes/templates/empty-order-receipt.php
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-paypal.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-alipay.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iamport-for-woocommerce/iamport-vbank.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-samsung.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-paymentwall.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-naverpay.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-phone.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-payco.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-kakao.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Base_Gateway_Iamport' not found in wp-content/plugins/iamport-for-woocommerce/iamport-card.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (23 tag instead of maximum 10)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === iamport-for-woocommerce === )
You can look at the official readme.txt

iamport-for-woocommerce/IamportPlugin.php 77% from 13 tests

"iamport-for-woocommerce" version 2.2.37'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:
  • Plugin Name: Please shorten the plugin name (currently 73 characters long instead of max. 70)
  • Description: Keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("iamport-for-woocommerce.php" instead of "IamportPlugin.php")

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 plugin10,745 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,9289578,162
JavaScript133712942,180
PO File2103147337
CSS23033
YAML12033

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.34
Average class complexity24.24
▷ Minimum class complexity1.00
▷ Maximum class complexity190.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes41
▷ Abstract classes12.44%
▷ Concrete classes4097.56%
▷ Final classes00.00%
Methods386
▷ Static methods5012.95%
▷ Public methods29476.17%
▷ Protected methods4010.36%
▷ Private methods5213.47%
Functions37
▷ Named functions3491.89%
▷ Anonymous functions38.11%
Constants48
▷ Global constants24.17%
▷ Class constants4695.83%
▷ Public constants46100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.36MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png124.18KB51.29KB▼ 58.70%
assets/screenshot-2.png101.62KB31.49KB▼ 69.01%
assets/banner-772x250.png72.85KB20.35KB▼ 72.07%
assets/icon-256x256.png12.87KB5.43KB▼ 57.77%
assets/screenshot-1.png58.27KB17.73KB▼ 69.58%