57% ht-pay-jp-for-kintone

Code Review | HT PAY.JP for kintone

WordPress plugin HT PAY.JP for kintone scored57%from 54 tests.

About plugin

  • Plugin page: ht-pay-jp-for-kin...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 3, 2019
  • Latest release: Nov 5, 2023
  • Number of updates: 39
  • Update frequency: every 39.1 days
  • Top authors: tkc49 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,930 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.83MB] [CPU: ▼33.72ms] Passed 4 tests

An overview of server-side resources used by HT PAY.JP for kintone
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0936.81 ▼5.13
Dashboard /wp-admin3.11 ▼0.1923.49 ▼35.77
Posts /wp-admin/edit.php3.12 ▼0.2425.94 ▼21.60
Add New Post /wp-admin/post-new.php3.12 ▼2.7726.75 ▼71.13
Media Library /wp-admin/upload.php3.12 ▼0.1127.09 ▼6.36

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for HT PAY.JP for kintone
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6114.03 ▼0.321.75 ▲0.0341.36 ▼3.13
Dashboard /wp-admin2,210 ▲325.61 ▼0.1094.34 ▼18.9839.73 ▼7.25
Posts /wp-admin/edit.php2,121 ▲212.72 ▲0.7248.96 ▲9.0135.36 ▲1.88
Add New Post /wp-admin/post-new.php1,540 ▲523.77 ▼1.55688.03 ▲60.8737.88 ▼25.77
Media Library /wp-admin/upload.php1,421 ▲215.30 ▲1.02118.45 ▲22.1045.60 ▲2.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/ht-pay-jp-for-kintone/includes/class-ht-payjp-for-kintone-Admin.php+74
    Use of undefined constant WPCF7_ADMIN_READ_WRITE_CAPABILITY - assumed 'WPCF7_ADMIN_READ_WRITE_CAPABILITY' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/build.php
  • 44× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Payjp\\TestCase' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/tests/ChargeTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Payjp\\Util\\Set' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/lib/PayjpObject.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Payjp\\Error\\Base' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/lib/Error/Api.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Payjp\\TestCase' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/tests/EventTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Payjp\\TestCase' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/tests/ErrorTest.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Payjp\\HttpClient\\ClientInterface' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/lib/HttpClient/CurlClient.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Payjp\\PayjpObject' not found in wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/lib/AttachedObject.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png)
You can take inspiration from this readme.txt

ht-pay-jp-for-kintone/ht-payjp-for-kintone.php 85% from 13 tests

"HT PAY.JP for kintone" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ht-pay-jp-for-kintone.php" instead of "ht-payjp-for-kintone.php")

Code Analysis 5% from 3 tests

File types 0% from 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
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/ht-pay-jp-for-kintone/vendor/payjp/payjp-php/data/ca-certificates.crt
4,096 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
PHP647557623,649
Markdown21620222
JSON300100
JavaScript316661
XML20030
CSS381325
YAML1309

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes52
▷ Abstract classes47.69%
▷ Concrete classes4892.31%
▷ Final classes00.00%
Methods234
▷ Static methods5623.93%
▷ Public methods20386.75%
▷ Protected methods166.84%
▷ Private methods156.41%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants9
▷ Global constants555.56%
▷ Class constants444.44%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/chosen/chosen-sprite.png0.53KB0.88KB0.00%
lib/jquery-ui/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
lib/jquery-ui/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
lib/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
lib/jquery-ui/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%