78% kinguin

Code Review | Kinguin API for WooCommerce

WordPress plugin Kinguin API for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: kinguin
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 21, 2022
  • Latest release: Jul 10, 2023
  • Number of updates: 22
  • Update frequency: every 20.2 days
  • Top authors: kinguin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,202 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.46MB] [CPU: ▼2.25ms] Passed 4 tests

An overview of server-side resources used by Kinguin API for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4744.57 ▼0.53
Dashboard /wp-admin3.76 ▲0.4651.08 ▼5.22
Posts /wp-admin/edit.php3.81 ▲0.4653.35 ▲2.16
Add New Post /wp-admin/post-new.php6.34 ▲0.4693.17 ▼5.42
Media Library /wp-admin/upload.php3.68 ▲0.4639.83 ▲5.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 431 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
plugin_activation_kinguin/kinguin.php
can_compress_scripts

Browser metrics Passed 4 tests

Kinguin API for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.082.05 ▼0.0842.64 ▼9.44
Dashboard /wp-admin2,204 ▲135.81 ▼0.0998.98 ▼2.5139.88 ▼0.08
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0840.14 ▼0.6137.32 ▼1.98
Add New Post /wp-admin/post-new.php1,518 ▼1517.57 ▼5.51686.51 ▲0.3460.71 ▼0.75
Media Library /wp-admin/upload.php1,392 ▲74.25 ▲0.1094.63 ▼5.2840.17 ▼1.52

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • plugin_activation_kinguin/kinguin.php
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kinguin/vendor/wpdesk/wp-builder/tests/integration/bootstrap.php
  • 133× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/kinguin/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/SettingsPage.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'ILKinguinVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/kinguin/vendor_prefixed/wpdesk/wp-wpdesk-helper/src/Page/LibraryDebugPage.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ILKinguinVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ILKinguinVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/kinguin/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ILKinguinVendor\\WPDesk_Translatable' not found in wp-content/plugins/kinguin/vendor_prefixed/wpdesk/wp-builder/src/Plugin/SlimPlugin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Main Interface.) image required
You can look at the official readme.txt

kinguin/kinguin.php Passed 13 tests

The main PHP script in "Kinguin API for WooCommerce" version 1.0.6 is automatically included on every request by WordPress
122 characters long description:
Import over 70,000 digital products to your online store, including video games, software, gift cards and in-game content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected24,882 lines of code in 412 files:
LanguageFilesBlank linesComment linesLines of code
PHP3471,99310,79718,006
CSS9173483,148
Sass13155131,619
JSON1610850
JavaScript98837512
PO File2193222470
Markdown9700213
XML313054
YAML1107
SVG3003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.08
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces51
Interfaces45
Traits14
Classes247
▷ Abstract classes135.26%
▷ Concrete classes23494.74%
▷ Final classes10.43%
Methods1,475
▷ Static methods916.17%
▷ Public methods1,11275.39%
▷ Protected methods16110.92%
▷ Private methods20213.69%
Functions102
▷ Named functions3029.41%
▷ Anonymous functions7270.59%
Constants162
▷ Global constants74.32%
▷ Class constants15595.68%
▷ Public constants155100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo@2x.png4.17KB4.47KB0.00%