10% kpi-integration

Code Review | Selected Kpi Integration

WordPress plugin Selected Kpi Integration scored 10% from 54 tests.

About plugin

  • Plugin page: kpi-integration
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.3
  • WordPress version: 5.8.1
  • First release: Jun 14, 2018
  • Latest release: Mar 26, 2019
  • Number of updates: 10
  • Update frequency: every 28.6 days
  • Top authors: lbeilis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 511 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/kpi-integration/api.php+25
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.73MB] [CPU: ▼188.70ms] Passed 4 tests

This is a short check of server-side resources used by Selected Kpi Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.90 ▼0.826.43 ▼22.57
Dashboard /wp-admin1.92 ▼1.146.88 ▼39.57
Posts /wp-admin/edit.php1.92 ▼1.197.85 ▼37.58
Add New Post /wp-admin/post-new.php1.92 ▼3.517.11 ▼650.75
Media Library /wp-admin/upload.php1.92 ▼1.087.04 ▼26.90

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Selected Kpi Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.83 ▲0.374.77 ▼3.8049.28 ▼6.00
Dashboard /wp-admin2,987 ▲565.86 ▼0.21136.94 ▼11.10117.09 ▼5.65
Posts /wp-admin/edit.php2,759 ▲232.69 ▼0.0063.36 ▼2.51103.66 ▲9.02
Add New Post /wp-admin/post-new.php1,511 ▼17218.92 ▲0.15385.38 ▲17.17114.24 ▲0.27
Media Library /wp-admin/upload.php1,827 ▲205.11 ▲0.10146.06 ▼4.31120.16 ▼2.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/kpi-integration/api.php+25
    Trying to access array offset on value of type bool

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No tags were found

kpi-integration/selected-kpi.php 85% from 13 tests

The main file in "Selected Kpi Integration" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("kpi-integration.php" instead of "selected-kpi.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin459 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP380163459

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity60.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes266.67%
Methods21
▷ Static methods00.00%
▷ Public methods1047.62%
▷ Protected methods00.00%
▷ Private methods1152.38%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected