83% associate-gravity-forms-with-products-for-woocommerce

Code Review | Associate Gravity Forms with WooCommerce

WordPress plugin Associate Gravity Forms with WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: associate-gravity...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2021
  • Latest release: Feb 20, 2023
  • Number of updates: 6
  • Update frequency: every 125.8 days
  • Top authors: emoxie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,022 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.01MB] [CPU: ▼7.28ms] Passed 4 tests

Analyzing server-side resources used by Associate Gravity Forms with WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.51 ▲2.97
Dashboard /wp-admin3.32 ▼0.0242.96 ▼9.00
Posts /wp-admin/edit.php3.38 ▲0.0242.66 ▼6.77
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.97 ▼13.85
Media Library /wp-admin/upload.php3.25 ▲0.0232.88 ▲0.52

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Associate Gravity Forms with WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.70 ▲0.291.70 ▲0.0942.84 ▼0.71
Dashboard /wp-admin2,195 ▲145.55 ▼0.1482.14 ▼22.6137.44 ▼4.32
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0433.57 ▼3.1935.57 ▼0.89
Add New Post /wp-admin/post-new.php1,526 ▼1223.74 ▲0.69679.53 ▲38.8359.18 ▲5.68
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.03103.50 ▲7.1648.28 ▲6.51

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ASSOCIATE_GRAVITY_FORMS_WOOCOMMERCE_SLUG - assumed 'ASSOCIATE_GRAVITY_FORMS_WOOCOMMERCE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/associate-gravity-forms-with-products-for-woocommerce/admin/meta-box.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/associate-gravity-forms-with-products-for-woocommerce/admin/meta-box.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: gravity forms checkout, gravity forms, woocommerce gravity forms

associate-gravity-forms-with-products-for-woocommerce/associate-gravity-forms-woocommerce.php 77% from 13 tests

The main PHP file in "Associate Gravity Forms with WooCommerce" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.8" instead of "2.6")
  • 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: It is recommended to name the main PHP file as the plugin slug ("associate-gravity-forms-with-products-for-woocommerce.php" instead of "associate-gravity-forms-woocommerce.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
Good job! No executable or dangerous file extensions detected230 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1194190219
JavaScript13011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods1575.00%
▷ Protected methods00.00%
▷ Private methods525.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin