77% agile-crm-gravity-forms

Code Review | Agile CRM Gravity Forms

WordPress plugin Agile CRM Gravity Forms scored77%from 54 tests.

About plugin

  • Plugin page: agile-crm-gravity...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Jan 8, 2018
  • Latest release: Jan 30, 2019
  • Number of updates: 5
  • Update frequency: every 78.0 days
  • Top authors: shreyanshsurana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,393 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼27.10ms] Passed 4 tests

An overview of server-side resources used by Agile CRM Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.84 ▼2.86
Dashboard /wp-admin3.38 ▲0.0750.97 ▼61.71
Posts /wp-admin/edit.php3.43 ▲0.0750.49 ▼12.58
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.24 ▼28.29
Media Library /wp-admin/upload.php3.30 ▲0.0737.11 ▼5.80

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Agile CRM Gravity Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.101.88 ▼0.1943.94 ▼1.50
Dashboard /wp-admin2,198 ▲275.65 ▲0.0588.31 ▼24.2640.34 ▼8.51
Posts /wp-admin/edit.php2,103 ▼02.06 ▲0.0338.12 ▼7.4034.76 ▼11.07
Add New Post /wp-admin/post-new.php1,532 ▼023.35 ▲2.36664.73 ▼105.9954.15 ▼11.76
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0599.63 ▼29.4539.73 ▼16.35

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
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/agile-crm-gravity-forms/agilecrm-gravityforms.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/agile-crm-gravity-forms/templates/form-tab.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/agile-crm-gravity-forms/templates/account-tab.php:2

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

readme.txt 88% 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 your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 ('/assets/screenshot-1.png'), #2 ('/assets/screenshot-2.png'), #3 ('/assets/screenshot-3.png'), #4 ('/assets/screenshot-4.png')
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

agile-crm-gravity-forms/agilecrm-gravityforms.php 85% from 13 tests

The main PHP script in "Agile CRM Gravity Forms" version 2.0 is automatically included on every request by WordPress
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.0.1" instead of "4.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("agile-crm-gravity-forms.php" instead of "agilecrm-gravityforms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected594 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP39062449
JavaScript1221145

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity5.54
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/agile500.png5.92KB3.87KB▼ 34.73%