58% kigokasa-api-for-woocommerce

Code Review | KigoKasa Api for WooCommerce

WordPress plugin KigoKasa Api for WooCommerce scored58%from 54 tests.

About plugin

  • Plugin page: kigokasa-api-for-...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Jul 7, 2023
  • Number of updates: 15
  • Update frequency: every 79.9 days
  • Top authors: symmetriahr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.55ms] Passed 4 tests

Server-side resources used by KigoKasa Api for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.38 ▼0.88
Dashboard /wp-admin3.31 ▲0.0048.03 ▼3.45
Posts /wp-admin/edit.php3.36 ▲0.0052.66 ▲2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.33 ▼10.41
Media Library /wp-admin/upload.php3.23 ▲0.0037.56 ▲0.54

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for KigoKasa Api for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.331.70 ▼0.0543.49 ▲4.44
Dashboard /wp-admin2,192 ▲155.61 ▼0.0592.06 ▼3.3942.10 ▼2.73
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0240.23 ▼0.0936.46 ▼1.33
Add New Post /wp-admin/post-new.php1,526 ▼322.95 ▼0.18658.65 ▼13.2359.33 ▲7.56
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.01108.90 ▼0.8446.36 ▼3.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/kigokasa-api-for-woocommerce/uninstall.php+19
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/kigokasa-api-for-woocommerce/uninstall.php:19
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • Incomplete uninstall procedure, leaving 29 files (0.09MB) in the plugin directory
    • (new file) admin/index.php
    • (new file) README.txt
    • (new file) includes/class-woo-kigokasa-api-activator.php
    • (new file) admin/class-woo-kigokasa-api-admin.php
    • (new file) includes/class-woo-kigokasa-api-deactivator.php
    • (new file) admin/css/woo-kigokasa-api-admin.css
    • (new file) README.md
    • (new file) admin/js/woo-kigokasa-api-admin.js
    • (new file) admin/partials/woo-kigokasa-api-admin-display.php
    • (new file) includes/class-woo-kigokasa-api-i18n.php
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-posts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/kigokasa-api-for-woocommerce/public/partials/woo-kigokasa-api-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/kigokasa-api-for-woocommerce/uninstall.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
The official readme.txt might help

kigokasa-api-for-woocommerce/kigokasa-api-for-woocommerce.php 92% from 13 tests

"KigoKasa Api for WooCommerce" version 1.2.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,105 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13222661782
PO File2110124259
Markdown136058
JavaScript24546
CSS2180

PHP code Passed 2 tests

A short review 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.32
Average class complexity12.12
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods40
▷ Static methods615.00%
▷ Public methods3382.50%
▷ Protected methods00.00%
▷ Private methods717.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin