83% qinvoice-connect-for-woocommerce

Code Review | Qinvoice Connect for Woocommerce

WordPress plugin Qinvoice Connect for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: qinvoice-connect-...
  • Plugin version: 2.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: Sep 24, 2021
  • Number of updates: 72
  • Update frequency: every 39.0 days
  • Top authors: q-invoice (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /6,092 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.33ms] Passed 4 tests

An overview of server-side resources used by Qinvoice Connect for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.55 ▲0.70
Dashboard /wp-admin3.35 ▲0.0050.81 ▼13.66
Posts /wp-admin/edit.php3.40 ▲0.0454.52 ▲4.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.68 ▼19.06
Media Library /wp-admin/upload.php3.27 ▲0.0437.76 ▲2.70

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Qinvoice Connect for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▼0.131.90 ▲0.2951.67 ▲13.72
Dashboard /wp-admin2,201 ▲245.57 ▼0.0588.81 ▼5.8540.60 ▲1.80
Posts /wp-admin/edit.php2,106 ▲61.98 ▼0.0336.96 ▼1.1534.01 ▲0.41
Add New Post /wp-admin/post-new.php1,532 ▲421.05 ▼2.20677.55 ▲7.0755.81 ▲2.40
Media Library /wp-admin/upload.php1,409 ▲154.20 ▲0.06106.15 ▲1.7744.29 ▼0.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/qinvoice-connect-for-woocommerce/woocommerce-qinvoice-connect.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("n/a")
You can look at the official readme.txt

qinvoice-connect-for-woocommerce/woocommerce-qinvoice-connect.php 85% from 13 tests

The main file in "Qinvoice Connect for Woocommerce" v. 2.2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("qinvoice-connect-for-woocommerce.php" instead of "woocommerce-qinvoice-connect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin6,464 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PO File52,2424,8794,972
PHP63942751,466
JavaScript23026

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity26.83
▷ Minimum class complexity4.00
▷ Maximum class complexity79.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods11.82%
▷ Public methods5498.18%
▷ Protected methods00.00%
▷ Private methods11.82%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/invoice.png0.81KB0.78KB▼ 3.26%
images/order_confirmation.png3.29KB0.73KB▼ 77.85%
images/quote.png0.45KB0.41KB▼ 8.10%