78% invelity-ikros-invoices

Code Review | Invelity iKros Invoices

WordPress plugin Invelity iKros Invoices scored78%from 54 tests.

About plugin

  • Plugin page: invelity-ikros-in...
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jan 24, 2018
  • Latest release: Apr 19, 2022
  • Number of updates: 25
  • Update frequency: every 61.9 days
  • Top authors: invelity (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼5.90ms] Passed 4 tests

A check of server-side resources used by Invelity iKros Invoices
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3336.84 ▼4.05
Dashboard /wp-admin3.74 ▲0.3947.38 ▼11.20
Posts /wp-admin/edit.php3.79 ▲0.4347.43 ▼0.33
Add New Post /wp-admin/post-new.php6.28 ▲0.3992.35 ▼8.00
Media Library /wp-admin/upload.php3.60 ▲0.3738.02 ▲5.03
Ikros invoices /wp-admin/admin.php?page=invelity-ikros-invoices3.5432.61
Invelity plugins /wp-admin/admin.php?page=invelity-plugins3.57376.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
ikros_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
variable_symbol_type
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Checking browser requirements for Invelity iKros Invoices
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.55 ▼0.831.70 ▼0.7542.76 ▼0.68
Dashboard /wp-admin2,235 ▲475.81 ▲0.0299.95 ▼13.0239.82 ▼4.62
Posts /wp-admin/edit.php2,121 ▲322.04 ▲0.0135.81 ▲1.4432.92 ▼1.97
Add New Post /wp-admin/post-new.php1,539 ▼623.46 ▲5.30610.58 ▲7.1961.81 ▼1.21
Media Library /wp-admin/upload.php1,411 ▲264.32 ▲0.1299.26 ▼2.0443.91 ▼0.32
Ikros invoices /wp-admin/admin.php?page=invelity-ikros-invoices1,0241.149.0567.13
Invelity plugins /wp-admin/admin.php?page=invelity-plugins1,0812.0435.7576.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • db_upgraded
    • ikros_options
    • variable_symbol_type
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=invelity-ikros-invoices
    • > Notice in wp-content/plugins/invelity-ikros-invoices/classes/class.invelityIkrosInvoicesAdmin.php+1007
    Undefined index: variable_symbol_type
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=invelity-ikros-invoices
    • > Notice in wp-content/plugins/invelity-ikros-invoices/classes/class.invelityIkrosInvoicesAdmin.php+1046
    Undefined index: invoice_number_format
    • > GET request to /wp-admin/admin.php?page=invelity-ikros-invoices
    • > Error in wp-content/plugins/invelity-ikros-invoices/classes/class.invelityIkrosInvoicesAdmin.php+1101
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/invelity-ikros-invoices/classes/class.invelityIkrosInvoicesAdmin.php:1101
    Stack trace:
    #0 wp-admin/includes/template.php(1824): InvelityIkrosInvoicesAdmin->ikros_invoice_numbering_list_callback()
    #1 wp-admin/includes/template.php(1778): do_settings_fields()
    #2 wp-content/plugins/invelity-ikros-invoices/classes/class.invelityIkrosInvoicesAdmin.php(155): do_settings_sections()
    #3 wp-includes/class-wp-hook.php(310): InvelityIkrosInvoicesAdmin->create_admin_page()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/invelity-ikros-invoices/invelity-ikros-invoices.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

invelity-ikros-invoices/invelity-ikros-invoices.php 92% from 13 tests

The principal PHP file in "Invelity iKros Invoices" v. 1.3.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 269 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,229 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP53081051,936
PO File179158169
JSON30041
CSS27034
SVG30227
JavaScript110322

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity58.80
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods91
▷ Static methods00.00%
▷ Public methods7582.42%
▷ Protected methods00.00%
▷ Private methods1617.58%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
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
2 PNG files occupy 0.36MB with 0.25MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png121.94KB37.09KB▼ 69.58%
assets/screenshot-1.png241.93KB63.05KB▼ 73.94%