10% konfirmi

Code Review | Konfirmi Plugin

WordPress plugin Konfirmi Plugin scored10%from 54 tests.

About plugin

  • Plugin page: konfirmi
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2019
  • Latest release: Mar 12, 2023
  • Number of updates: 494
  • Update frequency: every 2.7 days
  • Top authors: konfirmillc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,465 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/konfirmi/vendor/leafo/scssphp/src/Compiler.php+3749
    Trying to access array offset on value of type null

Server metrics [RAM: ▲0.47MB] [CPU: ▼38.16ms] Passed 4 tests

Analyzing server-side resources used by Konfirmi Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.51 ▲1.0126.46 ▼12.51
Dashboard /wp-admin4.53 ▲1.1525.81 ▼44.40
Posts /wp-admin/edit.php4.53 ▲1.1429.78 ▼24.08
Add New Post /wp-admin/post-new.php4.53 ▼1.4027.16 ▼71.65
Media Library /wp-admin/upload.php4.53 ▲1.2627.19 ▼9.52

Server storage [IO: ▲1.55MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • There were 2 files (7.45KB) illegally modified outside of "wp-content/plugins/konfirmi/" and "wp-content/uploads/"
    • (new file) Arraykonfirmi.min.css
    • (new file) wp-admin/Arraykonfirmi.min.css
Filesystem: 469 new files
Database: 2 new tables, 7 new options
New tables
wp_konfirmi_widget_forms
wp_konfirmi_forms
New WordPress options
theysaidso_admin_options
can_compress_scripts
konfirmi_db_version
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Konfirmi Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.41 ▲0.062.08 ▲0.3537.67 ▼2.53
Dashboard /wp-admin2,227 ▲465.59 ▼0.1996.48 ▼6.0636.46 ▼8.02
Posts /wp-admin/edit.php2,126 ▲262.00 ▼0.0439.82 ▼3.5631.98 ▼6.94
Add New Post /wp-admin/post-new.php1,551 ▲2521.56 ▼1.61673.67 ▼55.2437.57 ▼11.69
Media Library /wp-admin/upload.php1,426 ▲234.15 ▼0.02108.77 ▲7.1347.03 ▲2.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/konfirmi/vendor/leafo/scssphp/src/Compiler.php+3749
    Trying to access array offset on value of type null
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/konfirmi/konfirmi-plugin.php
    • > /wp-content/plugins/konfirmi/templates/caldera-templates/konfirmi-field-view.php
    • > /wp-content/plugins/konfirmi/templates/caldera-templates/konfirmi-field-preview.php
  • 179× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Konfirmi\\Base\\BaseController' not found in wp-content/plugins/konfirmi/app/Api/RestfulApi.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/konfirmi/vendor/symfony/yaml/Tests/InlineTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Konfirmi\\Base\\FormController' not found in wp-content/plugins/konfirmi/app/Base/Forms/WooCommerce.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/konfirmi/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php:36
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/konfirmi/app/Models/WidgetModel.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/konfirmi/vendor/twig/twig/src/Node/Expression/ConstantExpression.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/konfirmi/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/konfirmi/vendor/symfony/yaml/Exception/ParseException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\IncludeNode' not found in wp-content/plugins/konfirmi/vendor/twig/twig/src/Node/EmbedNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/konfirmi/vendor/twig/twig/src/TokenParser/ForTokenParser.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

konfirmi/konfirmi-plugin.php 85% from 13 tests

The main PHP file in "Konfirmi Plugin" ver. 2.1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("konfirmi.php" instead of "konfirmi-plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin32,472 lines of code in 451 files:
LanguageFilesBlank linesComment linesLines of code
PHP2715,7858,71323,632
YAML331791223,486
reStructuredText1142,4942,4092,934
JavaScript98210702
JSON700548
Markdown82340493
Sass13510293
Twig230126
make1245124
Bourne Shell16143
Python17316533
HTML12030
XML13027
CSS1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.89
▷ Minimum class complexity1.00
▷ Maximum class complexity735.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces47
Interfaces12
Traits0
Classes243
▷ Abstract classes135.35%
▷ Concrete classes23094.65%
▷ Final classes5825.22%
Methods1,543
▷ Static methods825.31%
▷ Public methods1,10871.81%
▷ Protected methods31520.41%
▷ Private methods1207.78%
Functions128
▷ Named functions7760.16%
▷ Anonymous functions5139.84%
Constants133
▷ Global constants00.00%
▷ Class constants133100.00%
▷ Public constants133100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png4.96KB3.10KB▼ 37.52%