78% leadsnap

Code Review | LeadSnap

WordPress plugin LeadSnap scored78%from 54 tests.

About plugin

  • Plugin page: leadsnap
  • Plugin version: 1.25
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2021
  • Latest release: Mar 9, 2023
  • Number of updates: 14
  • Update frequency: every 49.7 days
  • Top authors: leadsnap (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /4,074 total downloads

Benchmarks

Plugin footprint 82% 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.70MB] [CPU: ▼5.29ms] 75% from 4 tests

An overview of server-side resources used by LeadSnap
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 877.57ms on /wp-admin/options-general.php?page=lead-management-system-settings)
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6952.18 ▲9.30
Dashboard /wp-admin4.07 ▲0.7245.89 ▼15.10
Posts /wp-admin/edit.php4.12 ▲0.7653.24 ▲11.02
Add New Post /wp-admin/post-new.php6.58 ▲0.7082.27 ▼17.77
Media Library /wp-admin/upload.php3.93 ▲0.7037.49 ▲2.40
LeadSnap Settings /wp-admin/options-general.php?page=lead-management-system-settings3.89877.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
wsl_settings
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for LeadSnap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.65 ▼1.036.52 ▲4.7442.85 ▼2.59
Dashboard /wp-admin2,213 ▲225.88 ▼0.0399.40 ▼15.6539.23 ▼4.80
Posts /wp-admin/edit.php2,093 ▲71.99 ▲0.0039.15 ▼0.3836.15 ▼2.50
Add New Post /wp-admin/post-new.php1,550 ▲818.11 ▼0.11649.36 ▲45.3969.94 ▲11.76
Media Library /wp-admin/upload.php1,395 ▲44.20 ▲0.0396.75 ▼0.7442.78 ▲2.19
LeadSnap Settings /wp-admin/options-general.php?page=lead-management-system-settings8032.0323.9624.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • wsl_settings
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/leadsnap/admin/partials/send_to_company_field.php
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-cf7-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-thriveform-api.php:3
    • > PHP Notice
      Undefined variable: company in wp-content/plugins/leadsnap/admin/partials/send_to_company_field.php on line 13
    • > PHP Notice
      Trying to get property 'type' of non-object in wp-content/plugins/leadsnap/admin/partials/send_to_company_field.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-elementor-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-caldera-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-divi-api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wncrm_get_cf7_post_settings() in wp-content/plugins/leadsnap/admin/editor-panel.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-typeform-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wncrm_Base' not found in wp-content/plugins/leadsnap/includes/class-wsl-wpf-api.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: cf7, crm, management, contact-form, leads

leadsnap/leadsnap.php 92% from 13 tests

The main file in "LeadSnap" v. 1.25 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 154 characters long)

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
Success! There were no dangerous files found in this plugin4,432 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP236611194,418
JavaScript10114

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity38.72
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods289
▷ Static methods00.00%
▷ Public methods289100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin