84% slp-gravity-forms-locations

Code Review | Store Locator Plus® | Gravity Forms Locations

WordPress plugin Store Locator Plus® | Gravity Forms Locations scored84%from 54 tests.

About plugin

  • Plugin page: slp-gravity-forms...
  • Plugin version: 6.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Dec 29, 2022
  • Number of updates: 14
  • Update frequency: every 55.9 days
  • Top authors: DeBAAT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 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 gracefully, with no errors

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

This is a short check of server-side resources used by Store Locator Plus® | Gravity Forms Locations
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.00 ▼0.80
Dashboard /wp-admin3.31 ▲0.0043.03 ▼3.21
Posts /wp-admin/edit.php3.36 ▲0.0049.23 ▲1.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.68 ▲4.34
Media Library /wp-admin/upload.php3.23 ▲0.0039.08 ▲8.01

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 208 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
fs_gdpr
widget_theysaidso_widget
can_compress_scripts
fs_active_plugins
widget_recent-posts
fs_debug_mode
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Store Locator Plus® | Gravity Forms Locations: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.071.75 ▼0.1843.44 ▲0.50
Dashboard /wp-admin2,206 ▲154.86 ▼1.04109.52 ▲7.7839.62 ▼3.04
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0639.81 ▼3.8836.36 ▼1.12
Add New Post /wp-admin/post-new.php1,528 ▼118.12 ▼0.16662.26 ▲23.9065.20 ▲5.19
Media Library /wp-admin/upload.php1,388 ▼34.18 ▲0.03107.35 ▲6.4247.00 ▲3.83

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 10 options
    • fs_debug_mode
    • theysaidso_admin_options
    • db_upgraded
    • fs_gdpr
    • fs_accounts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • fs_active_plugins
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SLPLUS_PLUGINDIR - assumed 'SLPLUS_PLUGINDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/slp-gravity-forms-locations/include/module/ajax/SLP_Gravity_Forms_Locations_Ajax.php on line 4
    • > PHP Warning
      require_once(SLPLUS_PLUGINDIR/include/base_class.userinterface.php): failed to open stream: No such file or directory in wp-content/plugins/slp-gravity-forms-locations/include/module/ui/SLP_Gravity_Forms_Locations_UI.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/slp-gravity-forms-locations/include/base/loader.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'SLPLUS_PLUGINDIR/include/base_class.userinterface.php' (include_path='.:/usr/share/php') in wp-content/plugins/slp-gravity-forms-locations/include/module/ui/SLP_Gravity_Forms_Locations_UI.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'DebugMyPluginPanel' not found in wp-content/plugins/slp-gravity-forms-locations/include/class.dmppanels.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/slp-gravity-forms-locations/include/slp-gfl-meta-box-config.php:3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/slp-gravity-forms-locations/include/base/loader.php on line 3
    • > PHP Warning
      require_once(SLPLUS_PLUGINDIR/include/base_class.ajax.php): failed to open stream: No such file or directory in wp-content/plugins/slp-gravity-forms-locations/include/module/ajax/SLP_Gravity_Forms_Locations_Ajax.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/slp-gravity-forms-locations/include/base/loader.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'SLPLUS_PLUGINDIR/include/base_class.activation.php' (include_path='.:/usr/share/php') in wp-content/plugins/slp-gravity-forms-locations/include/module/activation/SLP_Gravity_Forms_Locations_Activation.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: integration, gravity forms integration, google maps, locations, gravity forms...

slp-gravity-forms-locations/slp-gravity-forms-locations.php Passed 13 tests

"Store Locator Plus® | Gravity Forms Locations" version 6.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
126 characters long description:
SLP Gravity Forms Locations is an add-on pack for Store Locator Plus that supports adding basic locations using Gravity Forms.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin35,419 lines of code in 151 files:
LanguageFilesBlank linesComment linesLines of code
PHP1328,29817,98734,747
JavaScript475100346
PO File1133313270
CSS14101256

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity77.95
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,332
▷ Static methods19514.64%
▷ Public methods93470.12%
▷ Protected methods191.43%
▷ Private methods37928.45%
Functions112
▷ Named functions112100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png1.56KB0.59KB▼ 62.31%
freemius/assets/img/slp-gravity-forms-locations.png64.50KB22.53KB▼ 65.08%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
images/edit-form-icon.png27.18KB10.27KB▼ 62.21%