94% gamipress-gravity-forms-integration

Code Review | GamiPress - Gravity Forms integration

WordPress plugin GamiPress - Gravity Forms integration scored 94% from 54 tests.

About plugin

  • Plugin page: gamipress-gravity...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Jul 27, 2017
  • Latest release: Jan 24, 2022
  • Number of updates: 40
  • Update frequency: every 41.1 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 6,684 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼297.70ms] Passed 4 tests

An overview of server-side resources used by GamiPress - Gravity Forms integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.70 ▲6.04
Dashboard /wp-admin3.41 ▲0.0133.60 ▲0.79
Posts /wp-admin/edit.php3.65 ▲0.0137.36 ▲0.91
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.42 ▼1,190.98
Media Library /wp-admin/upload.php3.30 ▲0.0122.07 ▼1.52

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by GamiPress - Gravity Forms integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲3715.93 ▲0.275.79 ▼0.072.10 ▼0.16
Dashboard /wp-admin2,920 ▲666.17 ▲0.02116.95 ▼15.78154.65 ▼5.99
Posts /wp-admin/edit.php2,719 ▲313.25 ▲0.0061.31 ▲0.59142.32 ▲5.33
Add New Post /wp-admin/post-new.php1,687 ▲2617.86 ▲1.67377.10 ▼3.49149.69 ▼9.30
Media Library /wp-admin/upload.php1,726 ▲285.53 ▼0.01135.87 ▲2.26183.27 ▼3.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-gravity-forms-integration/gamipress-gravity-forms.php:225

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can look at the official readme.txt

gamipress-gravity-forms-integration/gamipress-gravity-forms.php 92% from 13 tests

Analyzing the main PHP file in "GamiPress - Gravity Forms integration" version 1.2.2
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gamipress-gravity-forms-integration.php" instead of "gamipress-gravity-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin491 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8201426455
JavaScript212436

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin