Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.65MB] [CPU: ▼0.70ms] Passed 4 tests
A check of server-side resources used by KPiR
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.12 ▲0.66 | 47.45 ▲6.99 |
Dashboard /wp-admin | 4.00 ▲0.70 | 56.67 ▲3.17 |
Posts /wp-admin/edit.php | 4.05 ▲0.69 | 56.60 ▲4.65 |
Add New Post /wp-admin/post-new.php | 6.51 ▲0.63 | 92.61 ▼13.75 |
Media Library /wp-admin/upload.php | 3.85 ▲0.63 | 41.62 ▲3.12 |
JPK V7M /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_jpk_v7m | 3.95 | 37.46 |
All Invoices /wp-admin/edit.php?post_type=iworks_kpir_invoice | 3.97 | 41.84 |
Annually /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_report_annually | 3.97 | 38.52 |
Add New /wp-admin/post-new.php?post_type=iworks_kpir_invoice | 3.96 | 49.35 |
Monthly /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_report_monthly | 4.02 | 40.33 |
Configuration /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_index | 3.89 | 42.40 |
Contractors /wp-admin/edit.php?post_type=iworks_kpir_contract | 3.96 | 40.97 |
Server storage [IO: ▲0.57MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 82 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
iworks_kpir_cache_stamp |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for KPiR
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,025 ▲279 | 13.41 ▼0.97 | 2.20 ▲0.48 | 44.37 ▲3.30 |
Dashboard /wp-admin | 2,397 ▲206 | 5.88 ▲0.95 | 100.85 ▼4.12 | 39.00 ▼8.36 |
Posts /wp-admin/edit.php | 2,136 ▲47 | 2.04 ▲0.05 | 37.30 ▼3.61 | 31.43 ▼2.94 |
Add New Post /wp-admin/post-new.php | 1,571 ▲57 | 23.62 ▲6.05 | 683.60 ▲10.12 | 63.62 ▲4.65 |
Media Library /wp-admin/upload.php | 1,429 ▲41 | 4.21 ▼0.16 | 102.64 ▼1.09 | 45.75 ▲0.52 |
JPK V7M /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_jpk_v7m | 900 | 2.31 | 32.42 | 26.39 |
All Invoices /wp-admin/edit.php?post_type=iworks_kpir_invoice | 1,146 | 2.46 | 37.13 | 29.60 |
Annually /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_report_annually | 899 | 2.33 | 32.88 | 24.34 |
Add New /wp-admin/post-new.php?post_type=iworks_kpir_invoice | 2,079 | 3.29 | 66.65 | 35.91 |
Monthly /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_report_monthly | 893 | 2.27 | 30.01 | 24.93 |
Configuration /wp-admin/edit.php?post_type=iworks_kpir_invoice&page=iworks_kpir_index | 2,649 | 2.65 | 42.90 | 28.14 |
Contractors /wp-admin/edit.php?post_type=iworks_kpir_contract | 1,113 | 2.44 | 36.71 | 28.84 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
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 no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 22× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/footer.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/expense.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/head.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m/xml/expenses-summary.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/company.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/income.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/person.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m/xml/header.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m/xml/incomes-empty.php
- > /wp-content/plugins/kpir/template-parts/jpk/v7m/xml/income.php
- 139× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: args in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/income.php on line 6
- > PHP Notice
Undefined variable: args in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/expenses-summary.php on line 3
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/expense.php on line 3
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m/xml/expense.php on line 6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/company.php on line 4
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/company.php on line 3
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/head.php on line 7
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/person.php on line 4
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m/xml/income.php on line 2
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kpir/template-parts/jpk/v7m-2/xml/person.php on line 3
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: faktura, jpk, vat, ksigowo, kpir
kpir/kpir.php Passed 13 tests
Analyzing the main PHP file in "KPiR" version 1.0.0
38 characters long description:
Podatkowa Księga Przychodu i Rozchodu
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,882 lines of code in 58 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 30 | 343 | 1,156 | 5,291 |
CSS | 14 | 44 | 42 | 883 |
JavaScript | 11 | 76 | 94 | 569 |
Sass | 3 | 5 | 0 | 139 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 192)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 68.36 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 387.00 |
Average method complexity | 5.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 192.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 1 | 9.09% |
▷ Concrete classes | 10 | 90.91% |
▷ Final classes | 0 | 0.00% |
Methods | 178 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 114 | 64.04% |
▷ Protected methods | 14 | 7.87% |
▷ Private methods | 50 | 28.09% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/iworks/options/assets/styles/images/ui-icons_555555_256x240.png | 6.91KB | 4.18KB | ▼ 39.47% |
includes/iworks/options/assets/styles/images/ui-icons_777777_256x240.png | 6.94KB | 4.18KB | ▼ 39.78% |
includes/iworks/options/assets/styles/images/ui-icons_444444_256x240.png | 6.92KB | 4.18KB | ▼ 39.61% |
assets/externals/datepicker/css/images/ui-icons_555555_256x240.png | 6.82KB | 4.17KB | ▼ 38.82% |
includes/iworks/options/assets/styles/images/ui-icons_777620_256x240.png | 4.51KB | 4.18KB | ▼ 7.28% |