84% qinvoice-connect-for-gravity-forms

Code Review | q-invoice connect for Gravity Forms

WordPress plugin q-invoice connect for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: qinvoice-connect-...
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Mar 9, 2020
  • Number of updates: 24
  • Update frequency: every 71.0 days
  • Top authors: q-invoice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,416 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by q-invoice connect for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.10 ▲3.71
Dashboard /wp-admin3.33 ▲0.0351.23 ▼0.64
Posts /wp-admin/edit.php3.44 ▲0.0948.07 ▼2.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.88 ▼4.84
Media Library /wp-admin/upload.php3.25 ▲0.0242.35 ▲4.20

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for q-invoice connect for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.08 ▼0.592.08 ▲0.2844.99 ▲3.60
Dashboard /wp-admin2,195 ▲185.63 ▲0.0590.12 ▼2.5340.00 ▼2.81
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0042.45 ▲3.2934.91 ▼2.60
Add New Post /wp-admin/post-new.php1,531 ▲523.12 ▲0.05696.71 ▼24.4157.54 ▼13.19
Media Library /wp-admin/upload.php1,400 ▼04.17 ▲0.07111.17 ▼6.6847.89 ▼1.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qinvoice-connect-for-gravity-forms/qinvoiceconnect.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/qinvoice-connect-for-gravity-forms/class-gf-qinvoice-connect.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Please fix the following attributes:
  • Donate link: Invalid URI ("n/a")
You can look at the official readme.txt

qinvoice-connect-for-gravity-forms/qinvoiceconnect.php 92% from 13 tests

The principal PHP file in "q-invoice connect for Gravity Forms" v. 2.3.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("qinvoice-connect-for-gravity-forms.php" instead of "qinvoiceconnect.php")

Code Analysis Passed 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
No dangerous file extensions were detected1,483 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3203491,125
PO File2142148354
Markdown1204

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity27.33
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods717.50%
▷ Public methods3895.00%
▷ Protected methods00.00%
▷ Private methods25.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/tick.png0.52KB0.52KB0.00%