84% komoju-japanese-payments

Code Review | KOMOJU Payments

WordPress plugin KOMOJU Payments scored84%from 54 tests.

About plugin

  • Plugin page: komoju-japanese-p...
  • Plugin version: 3.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Jun 17, 2020
  • Latest release: Oct 11, 2023
  • Number of updates: 43
  • Update frequency: every 28.2 days
  • Top authors: degica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /7,312 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
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼6.98ms] Passed 4 tests

This is a short check of server-side resources used by KOMOJU Payments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0731.25 ▼5.89
Dashboard /wp-admin3.32 ▼0.0345.78 ▼14.70
Posts /wp-admin/edit.php3.37 ▲0.0147.22 ▼1.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.01 ▼5.62
Media Library /wp-admin/upload.php3.24 ▲0.0140.66 ▲6.81

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

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

Browser metrics Passed 4 tests

KOMOJU Payments: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼30714.21 ▼0.360.74 ▼0.9622.23 ▼16.81
Dashboard /wp-admin2,198 ▲245.64 ▲0.0581.67 ▼2.5739.00 ▼3.65
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0238.74 ▲1.1233.75 ▲2.33
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▼0.11635.80 ▼11.9862.07 ▲2.03
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.0498.47 ▼4.1044.74 ▼3.11

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/komoju-japanese-payments/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: payment gateway, komoju, woocommerce

komoju-japanese-payments/index.php 92% from 13 tests

The principal PHP file in "KOMOJU Payments" v. 3.0.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("komoju-japanese-payments.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin4,841 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JSON4002,564
PHP182644251,497
JavaScript77776425
Markdown2830146
PO File14669129
Bourne Again Shell1262780

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.55
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods91
▷ Static methods77.69%
▷ Public methods6369.23%
▷ Protected methods1819.78%
▷ Private methods1010.99%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin