78% gravity-forms-capsulecrm-add-on

Code Review | Gravity Forms CapsuleCRM Add-on

WordPress plugin Gravity Forms CapsuleCRM Add-on scored78%from 54 tests.

About plugin

  • Plugin page: gravity-forms-cap...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.3.1
  • WordPress version: 6.3.1
  • First release: Apr 4, 2012
  • Latest release: Apr 7, 2012
  • Number of updates: 22
  • Update frequency: every 0.1 days
  • Top authors: hippoc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,855 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.78ms] Passed 4 tests

Server-side resources used by Gravity Forms CapsuleCRM Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.76 ▲1.49
Dashboard /wp-admin3.44 ▲0.1448.11 ▲0.97
Posts /wp-admin/edit.php3.55 ▲0.2045.17 ▼2.59
Add New Post /wp-admin/post-new.php6.02 ▲0.1391.57 ▼1.96
Media Library /wp-admin/upload.php3.36 ▲0.1334.53 ▲0.47

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms CapsuleCRM Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.221.69 ▼0.3243.31 ▲0.34
Dashboard /wp-admin2,206 ▲155.83 ▼0.0296.85 ▼6.7040.01 ▲1.18
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0434.04 ▲0.1130.48 ▼3.68
Add New Post /wp-admin/post-new.php1,542 ▲2818.30 ▲0.76590.47 ▼20.4355.43 ▲4.61
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0293.98 ▼1.7342.31 ▼0.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/messages_error.html.php
    • > /wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/action_gform_entries_first_column_actions.html.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gravity-forms-capsulecrm-add-on/api/GFToArray.php on line 113
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/messages_error.html.php on line 7
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/messages_error.html.php on line 4
    • > PHP Warning
      file_get_contents(wp-content/plugins/gravity-forms-capsulecrm-add-on/api/test/data/model.2): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/gravity-forms-capsulecrm-add-on/api/test/Data.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/filter_add_form_option_tooltip.html.php:1
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/show_capsulecrm_status.php on line 13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/action_add_form_option.js.php on line 5
    • > PHP Notice
      Undefined variable: action in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/action_gform_entries_first_column_actions.html.php on line 2
    • > PHP Warning
      include(data/couples.php): failed to open stream: No such file or directory in wp-content/plugins/gravity-forms-capsulecrm-add-on/api/test/Data.php on line 22
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/gravity-forms-capsulecrm-add-on/templates/rgformsaction_settings_page.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (The Gravity Forms CapsuleCRM Add-on settings page), #2 (It's easy to integrate Gravity Forms with CapsuleCRM: check a box in the "Advanced" tab of a form's Form Settings)
The official readme.txt might help

gravity-forms-capsulecrm-add-on/capsulecrm.php 92% from 13 tests

The main PHP script in "Gravity Forms CapsuleCRM Add-on" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gravity-forms-capsulecrm-add-on.php" instead of "capsulecrm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,853 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP231326781,701
YAML1121143
XML1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity20.49
▷ Minimum class complexity1.00
▷ Maximum class complexity192.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces2
Interfaces2
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods371
▷ Static methods7419.95%
▷ Public methods26270.62%
▷ Protected methods3910.51%
▷ Private methods7018.87%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants37
▷ Global constants12.70%
▷ Class constants3697.30%
▷ Public constants36100.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