83% rentpress-gravity-forms-add-on

Code Review | RentPress: Gravity Forms Add-on

WordPress plugin RentPress: Gravity Forms Add-on scored83%from 54 tests.

About plugin

  • Plugin page: rentpress-gravity...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: May 31, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 18
  • Update frequency: every 29.4 days
  • Top authors: ryanmarch (55.56%)30lines (50%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by RentPress: Gravity Forms Add-on
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.01 ▼5.87
Dashboard /wp-admin3.31 ▲0.0046.02 ▼4.26
Posts /wp-admin/edit.php3.36 ▲0.0046.88 ▼3.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.25 ▼9.86
Media Library /wp-admin/upload.php3.23 ▲0.0034.77 ▼0.46

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for RentPress: Gravity Forms Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.57 ▲0.251.73 ▼0.2239.34 ▼4.81
Dashboard /wp-admin2,192 ▲125.61 ▼0.0390.14 ▼2.7139.24 ▼3.71
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0440.34 ▼1.4238.58 ▲2.30
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▼0.00642.58 ▲1.8568.12 ▲17.12
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.0294.16 ▼9.3440.23 ▼3.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/rentpress-gravity-forms-add-on/src/rentPressGravityForms/Leads.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

rentpress-gravity-forms-add-on/rentPressGravityFormsWP.php 85% from 13 tests

Analyzing the main PHP file in "RentPress: Gravity Forms Add-on" version 1.0.4
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rentpress-gravity-forms-add-on.php" instead of "rentPressGravityFormsWP.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,482 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5981441,347
JavaScript1121135

PHP code Passed 2 tests

An overview 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.79
Average class complexity72.33
▷ Minimum class complexity2.00
▷ Maximum class complexity206.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions9
▷ Named functions333.33%
▷ Anonymous functions666.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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