10% leads-5050-visitor-insights

Code Review | Leads and Visitor Insights

WordPress plugin Leads and Visitor Insights scored10%from 54 tests.

About plugin

  • Plugin page: leads-5050-visito...
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 17, 2020
  • Latest release: Nov 20, 2023
  • Number of updates: 67
  • Update frequency: every 19.2 days
  • Top authors: creatorseo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,388 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.76MB] [CPU: ▼54.82ms] Passed 4 tests

This is a short check of server-side resources used by Leads and Visitor Insights
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.226.03 ▼36.88
Dashboard /wp-admin2.27 ▼1.088.38 ▼55.92
Posts /wp-admin/edit.php2.27 ▼1.106.97 ▼39.52
Add New Post /wp-admin/post-new.php2.27 ▼3.636.69 ▼86.94
Media Library /wp-admin/upload.php2.27 ▼0.977.85 ▼25.33
Settings /wp-admin/admin.php?page=leads5050-settings2.277.08
Visit Info /wp-admin/admin.php?page=leads5050-visits2.277.27
Lead Insights /wp-admin/admin.php?page=leads5050-dashboard2.276.24
Visit map /wp-admin/admin.php?page=leads5050-map2.277.92
Dashboard /wp-admin/admin.php?page=leads5050-dash2.277.15

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
leads5050_lox
leads5050_options
widget_recent-posts
leads5050_log
theysaidso_admin_options
widget_recent-comments
leads5050_code
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Leads and Visitor Insights
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8314.10 ▼0.151.60 ▼0.2840.90 ▼2.08
Dashboard /wp-admin2,219 ▲415.74 ▲0.0394.89 ▼18.2475.40 ▲29.87
Posts /wp-admin/edit.php2,136 ▲362.00 ▼0.0039.74 ▲0.0738.25 ▲3.77
Add New Post /wp-admin/post-new.php1,710 ▲17222.50 ▼0.46699.13 ▲57.3944.37 ▼18.87
Media Library /wp-admin/upload.php1,436 ▲334.15 ▲0.0198.63 ▲1.5771.06 ▲29.85
Settings /wp-admin/admin.php?page=leads5050-settings9383.5564.8439.50
Visit Info /wp-admin/admin.php?page=leads5050-visits8443.5659.3828.42
Lead Insights /wp-admin/admin.php?page=leads5050-dashboard9353.4837.3734.16
Visit map /wp-admin/admin.php?page=leads5050-map8463.4937.1428.41
Dashboard /wp-admin/admin.php?page=leads5050-dash8403.4732.0326.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • leads5050_code
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=leads5050-dash
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

SRP 50% 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
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(LREFI_DIRinc/leads5050-ajax-functions.php): failed to open stream: No such file or directory in wp-content/plugins/leads-5050-visitor-insights/class.leads5050-visitor-insights.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'LREFI_DIRinc/leads5050-ajax-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/leads-5050-visitor-insights/class.leads5050-visitor-insights.php on line 21
    • > PHP Warning
      Use of undefined constant LREFI_DIR - assumed 'LREFI_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/leads-5050-visitor-insights/trunk/class.leads5050-visitor-insights.php on line 21
    • > PHP Warning
      require_once(LREFI_DIRinc/leads5050-ajax-functions.php): failed to open stream: No such file or directory in wp-content/plugins/leads-5050-visitor-insights/trunk/class.leads5050-visitor-insights.php on line 21
    • > PHP Warning
      Use of undefined constant LREFI_DIR - assumed 'LREFI_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/leads-5050-visitor-insights/class.leads5050-visitor-insights.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'LREFI_DIRinc/leads5050-ajax-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/leads-5050-visitor-insights/trunk/class.leads5050-visitor-insights.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/leads-5050-visitor-insights/trunk/inc/leads5050-shortcodes.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/leads-5050-visitor-insights/inc/leads5050-shortcodes.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

leads-5050-visitor-insights/leads5050-visitor-insights.php 92% from 13 tests

The entry point to "Leads and Visitor Insights" version 2.1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("leads-5050-visitor-insights.php" instead of "leads5050-visitor-insights.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,264 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP655321690
JavaScript43279378
CSS24816196

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/icon-32x32.png2.96KB1.49KB▼ 49.54%
trunk/css/icon-32x32.png2.96KB1.49KB▼ 49.54%
trunk/css/icon-20x20.png1.80KB1.03KB▼ 42.73%
css/icon-20x20.png1.80KB1.03KB▼ 42.73%