67% innokassa

Code Review | Innokassa

WordPress plugin Innokassa scored67%from 54 tests.

About plugin

  • Plugin page: innokassa
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 10, 2022
  • Latest release: Jun 10, 2022
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: innokassa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,146 total downloads

Benchmarks

Plugin footprint 65% 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.19MB] [CPU: ▼1.26ms] Passed 4 tests

A check of server-side resources used by Innokassa
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2241.32 ▲3.32
Dashboard /wp-admin3.52 ▲0.2251.38 ▲5.98
Posts /wp-admin/edit.php3.58 ▲0.2245.51 ▼1.85
Add New Post /wp-admin/post-new.php6.04 ▲0.1679.86 ▼11.07
Media Library /wp-admin/upload.php3.39 ▲0.1638.71 ▲4.55
Настройки Innokassa /wp-admin/admin.php?page=Innokassa_submenu3.4431.06

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 99 new files
Database: 2 new tables, 7 new options
New tables
wp_mr_checks_log
wp_innokassa_receipts
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Innokassa
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.70 ▲0.0443.81 ▼1.12
Dashboard /wp-admin2,198 ▲215.61 ▼0.0586.12 ▼5.2941.30 ▼0.34
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0237.38 ▲0.5636.09 ▲4.34
Add New Post /wp-admin/post-new.php1,526 ▼223.18 ▼0.07654.58 ▼25.6850.42 ▼1.88
Media Library /wp-admin/upload.php1,400 ▲34.27 ▲0.0293.27 ▼9.2342.85 ▼4.24
Настройки Innokassa /wp-admin/admin.php?page=Innokassa_submenu6811.516.3119.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 2 tables in the database
    • wp_mr_checks_log
    • wp_innokassa_receipts
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=Innokassa_submenu
    • > Error in wp-content/plugins/innokassa/admin/partials/Innokassa-admin-display.php+14
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/innokassa/admin/partials/Innokassa-admin-display.php:14
    Stack trace:
    #0 wp-content/plugins/innokassa/admin/class-Innokassa-admin.php(98): include()
    #1 wp-content/plugins/innokassa/admin/class-Innokassa-admin.php(92): InnokassaAdmin->render()
    #2 wp-includes/class-wp-hook.php(310): InnokassaAdmin->renderAdminPage()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 50% 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
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/innokassa/InnokassaCheckout.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Innokassa\\MDK\\Services\\AutomaticInterface' not found in wp-content/plugins/innokassa/mdk/src/Services/AutomaticBase.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/innokassa/admin/partials/Innokassa-admin-display.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Innokassa\\MDK\\Logger\\LoggerInterface' not found in wp-content/plugins/innokassa/mdk/src/Logger/LoggerFile.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Innokassa\\MDK\\Entities\\ConverterAbstract' not found in wp-content/plugins/innokassa/mdk/src/Net/ConverterApi.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Innokassa\\MDK\\Entities\\AtomAbstract' not found in wp-content/plugins/innokassa/mdk/src/Entities/Atoms/ReceiptItemType.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Innokassa\\MDK\\Entities\\AtomAbstract' not found in wp-content/plugins/innokassa/mdk/src/Entities/Atoms/ReceiptSubType.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Innokassa\\MDK\\Exceptions\\BaseException' not found in wp-content/plugins/innokassa/mdk/src/Exceptions/Base/InvalidArgumentException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Innokassa\\MDK\\Services\\PipelineInterface' not found in wp-content/plugins/innokassa/mdk/src/Services/PipelineBase.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Innokassa\\MDK\\Entities\\ReceiptId\\ReceiptIdFactoryInterface' not found in wp-content/plugins/innokassa/mdk/src/Entities/ReceiptId/ReceiptIdFactoryMeta.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid version format
  • Requires at least: Invalid version format
  • Tags: No valid plugin tags found
The official readme.txt is a good inspiration

innokassa/InnokassaCheckout.php 77% from 13 tests

The main PHP script in "Innokassa" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("innokassa.php" instead of "InnokassaCheckout.php")
  • Description: The description should be shorter than 140 characters (currently 254 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Good job! No executable or dangerous file extensions detected4,275 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP729521,9323,853
Markdown1580182
JSON400110
YAML214075
XML11026
Dockerfile14012
Bourne Shell3309
INI1006
JavaScript1102

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.95
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces14
Interfaces9
Traits0
Classes55
▷ Abstract classes35.45%
▷ Concrete classes5294.55%
▷ Final classes00.00%
Methods266
▷ Static methods134.89%
▷ Public methods25294.74%
▷ Protected methods31.13%
▷ Private methods114.14%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants106
▷ Global constants10.94%
▷ Class constants10599.06%
▷ Public constants105100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
mdk/logo.png39.84KB18.86KB▼ 52.67%