83% sprout-invoices-gravity-forms

Code Review | Gravity Forms + Sprout Invoices - Easy Invoice & Estimate Submissions

WordPress plugin Gravity Forms + Sprout Invoices - Easy Invoice & Estimate Submissions scored83%from 54 tests.

About plugin

  • Plugin page: sprout-invoices-g...
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Jan 19, 2018
  • Latest release: Aug 9, 2023
  • Number of updates: 26
  • Update frequency: every 78.0 days
  • Top authors: dancameron (73.08%)boldgrid (19.23%)avonville1 (11.54%)wvcody (7.69%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.40ms] Passed 4 tests

Analyzing server-side resources used by Gravity Forms + Sprout Invoices - Easy Invoice & Estimate Submissions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0137.51 ▼7.48
Dashboard /wp-admin3.35 ▼0.0448.68 ▼15.81
Posts /wp-admin/edit.php3.40 ▲0.0051.45 ▼5.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0097.43 ▲0.90
Media Library /wp-admin/upload.php3.27 ▲0.0037.10 ▼0.32

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms + Sprout Invoices - Easy Invoice & Estimate Submissions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.24 ▼0.111.84 ▼0.1442.56 ▼1.54
Dashboard /wp-admin2,195 ▲185.61 ▼0.0589.84 ▼0.2540.97 ▼4.22
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0138.91 ▲0.8438.73 ▲2.15
Add New Post /wp-admin/post-new.php1,526 ▼022.90 ▼0.06657.66 ▼15.6850.71 ▼9.23
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.0094.84 ▼21.7845.29 ▼4.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/sprout-invoices-gravity-forms/inc/SI_GF_Integration_Addon.php:3

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 86% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings overview), #2 (Settings view), #3 (Form submission with redirect to newly created invoice)
You can look at the official readme.txt

sprout-invoices-gravity-forms/sprout-invoices-gravity-forms.php 77% from 13 tests

Analyzing the main PHP file in "Gravity Forms + Sprout Invoices - Easy Invoice & Estimate Submissions" version 1.3.5
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin664 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP213795589
PO File1202263
JavaScript14512

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.50
▷ Minimum class complexity2.00
▷ Maximum class complexity79.00
Average method complexity4.76
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods838.10%
▷ Public methods1571.43%
▷ Protected methods523.81%
▷ Private methods14.76%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.32MB with 0.23MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png327.22KB91.42KB▼ 72.06%