78% lead-generated

Code Review | Lead Generated

WordPress plugin Lead Generated scored78%from 54 tests.

About plugin

  • Plugin page: lead-generated
  • 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: Jul 20, 2019
  • Latest release: Feb 14, 2023
  • Number of updates: 32
  • Update frequency: every 41.4 days
  • Top authors: leadgenerated (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /27,512 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.71MB] [CPU: ▼0.86ms] 75% from 4 tests

Analyzing server-side resources used by Lead Generated
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 981.67ms on /wp-admin/options-general.php?page=lead-management-system-settings)
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6843.94 ▲6.97
Dashboard /wp-admin4.07 ▲0.7653.97 ▲7.07
Posts /wp-admin/edit.php4.12 ▲0.7648.68 ▼0.06
Add New Post /wp-admin/post-new.php6.58 ▲0.6988.69 ▼12.23
Media Library /wp-admin/upload.php3.93 ▲0.6937.59 ▲1.87
Lead Generated Settings /wp-admin/options-general.php?page=lead-management-system-settings3.89981.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
wsl_settings
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Lead Generated
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.49 ▼1.108.08 ▲6.4742.71 ▲0.31
Dashboard /wp-admin2,202 ▲215.61 ▼0.1194.46 ▼2.5446.03 ▲1.23
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0635.20 ▼0.6431.29 ▼5.53
Add New Post /wp-admin/post-new.php1,529 ▼823.22 ▲5.05676.92 ▲18.7058.64 ▼15.08
Media Library /wp-admin/upload.php1,407 ▲44.19 ▲0.0398.84 ▲0.0742.62 ▼1.34
Lead Generated Settings /wp-admin/options-general.php?page=lead-management-system-settings7962.0025.4425.96

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • wsl_settings
    • db_upgraded

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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lead-generated/admin/partials/send_to_company_field.php
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Lg_Crm' not found in wp-content/plugins/lead-generated/includes/class-wsl-gravity-api.php:3
    • > PHP Notice
      Trying to get property 'type' of non-object in wp-content/plugins/lead-generated/admin/partials/send_to_company_field.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Lg_Crm' not found in wp-content/plugins/lead-generated/includes/class-wsl-divi-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Lg_Crm' not found in wp-content/plugins/lead-generated/includes/class-wsl-elementor-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Lg_Crm' not found in wp-content/plugins/lead-generated/includes/class-wsl-cf7-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Lg_Crm' not found in wp-content/plugins/lead-generated/includes/class-wsl-caldera-api.php:3
    • > PHP Notice
      Undefined variable: company in wp-content/plugins/lead-generated/admin/partials/send_to_company_field.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lead-generated/lead-generated.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Lg_Crm' not found in wp-content/plugins/lead-generated/includes/class-wsl-beaver-api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lgcrm_get_cf7_post_settings() in wp-content/plugins/lead-generated/admin/editor-panel.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: crm, leads, management, cf7, contact-form

lead-generated/lead-generated.php 92% from 13 tests

The primary PHP file in "Lead Generated" version 1.25 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)

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
There were no executable files found in this plugin4,433 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP236601204,419
JavaScript10114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin