93% gravity-forms-coupons-exclude-shipping

Code Review | Gravity Forms Coupons: Exclude Shipping

WordPress plugin Gravity Forms Coupons: Exclude Shipping scored 93% from 54 tests.

About plugin

  • Plugin page: gravity-forms-cou...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 5.8.1
  • First release: Oct 3, 2014
  • Latest release: Mar 8, 2021
  • Number of updates: 12
  • Update frequency: every 196.1 days
  • Top authors: spivurno (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,117 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Gravity Forms Coupons: Exclude Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1330.10 ▲2.73
Dashboard /wp-admin3.07 ▲0.0246.42 ▲10.39
Posts /wp-admin/edit.php3.12 ▲0.0241.74 ▼3.98
Add New Post /wp-admin/post-new.php5.43 ▼0.0086.02 ▼576.26
Media Library /wp-admin/upload.php3.01 ▲0.0137.57 ▼1.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Gravity Forms Coupons: Exclude Shipping: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.92 ▲0.279.87 ▼0.1150.33 ▲2.93
Dashboard /wp-admin2,973 ▲425.98 ▼0.11154.83 ▲2.83117.38 ▲6.96
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0270.96 ▲5.0294.04 ▼1.34
Add New Post /wp-admin/post-new.php1,672 ▼2,03418.94 ▼0.35407.17 ▼73.81109.13 ▼0.25
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.02151.59 ▼3.17118.89 ▲2.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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)
Everything seems fine, however 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-coupons-exclude-shipping/gw-gravity-forms-coupons-exclude-shipping.php:34

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: shipping, gravity forms, coupons, discount

gravity-forms-coupons-exclude-shipping/gw-gravity-forms-coupons-exclude-shipping.php 77% from 13 tests

The main PHP script in "Gravity Forms Coupons: Exclude Shipping" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gravity-forms-coupons-exclude-shipping.php" instead of "gw-gravity-forms-coupons-exclude-shipping.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1392976

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin