83% sprout-invoices-ninja-forms

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

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

About plugin

  • Plugin page: sprout-invoices-n...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 5, 2018
  • Latest release: Aug 9, 2023
  • Number of updates: 25
  • Update frequency: every 80.5 days
  • Top authors: dancameron (72%)boldgrid (20%)avonville1 (12%)wvcody (8%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,246 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.66ms] Passed 4 tests

This is a short check of server-side resources used by Ninja Forms + Sprout Invoices - Easy Invoice & Estimate Submissions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.62 ▼6.21
Dashboard /wp-admin3.31 ▲0.0043.55 ▼6.21
Posts /wp-admin/edit.php3.36 ▲0.0045.55 ▲0.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.58 ▼13.89
Media Library /wp-admin/upload.php3.23 ▲0.0035.15 ▼0.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Ninja Forms + Sprout Invoices - Easy Invoice & Estimate Submissions: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.42 ▼1.211.64 ▼0.2545.77 ▲2.91
Dashboard /wp-admin2,206 ▲185.85 ▲0.94106.54 ▲0.9738.80 ▼3.61
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0440.85 ▲6.5735.77 ▲4.19
Add New Post /wp-admin/post-new.php1,533 ▼1123.16 ▲4.64605.83 ▼31.1354.68 ▲4.33
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.02100.52 ▲2.6544.18 ▼0.08

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sprout-invoices-ninja-forms/includes/Templates/custom-meta-repeater-row.html.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Form submission with redirect to newly created estimate), #2 (Complete settings view), #3 (Settings overview)
The official readme.txt might help

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

Analyzing the main PHP file in "Ninja Forms + Sprout Invoices - Easy Invoice & Estimate Submissions" version 1.3.1
Please make the necessary changes and fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected656 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6183310645
JavaScript12011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity27.33
▷ Minimum class complexity11.00
▷ Maximum class complexity59.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes266.67%
Methods25
▷ Static methods312.00%
▷ Public methods2184.00%
▷ Protected methods312.00%
▷ Private methods14.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin