82% chatbot-lazy-loader

Code Review | Chatbot Lazy Loader

WordPress plugin Chatbot Lazy Loader scored 82% from 54 tests.

About plugin

  • Plugin page: chatbot-lazy-loader
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4.2
  • WordPress version: 5.9.2
  • First release: Jul 8, 2020
  • Latest release: Aug 4, 2020
  • Number of updates: 23
  • Update frequency: every 1.2 days
  • Top authors: jfarruggio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 779 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.38MB] [CPU: ▼286.25ms] Passed 4 tests

Analyzing server-side resources used by Chatbot Lazy Loader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4062.38 ▲9.18
Dashboard /wp-admin4.79 ▲1.3846.19 ▲5.63
Posts /wp-admin/edit.php5.07 ▲1.4348.95 ▲11.30
Add New Post /wp-admin/post-new.php8.30 ▲1.33104.68 ▼1,168.55
Media Library /wp-admin/upload.php4.71 ▲1.4135.15 ▲8.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 588 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Chatbot Lazy Loader
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,133 ▲39120.65 ▲5.066.24 ▲0.052.25 ▼0.19
Dashboard /wp-admin3,276 ▲41510.48 ▲4.31194.75 ▲52.18155.60 ▼10.75
Posts /wp-admin/edit.php3,105 ▲4357.92 ▲4.67107.45 ▲44.81140.42 ▼7.34
Add New Post /wp-admin/post-new.php1,896 ▲14518.71 ▼2.13468.41 ▼13.91170.36 ▲4.83
Media Library /wp-admin/upload.php1,883 ▲1857.89 ▲2.39144.47 ▼0.91195.29 ▲1.45
Chatbot Lazy Loader /wp-admin/crb_carbon_fields_container_chatbot_lazy_loader.php260.940.0324.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 208× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/chatbot-lazy-loader/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/chatbot-lazy-loader/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/chatbot-lazy-loader/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/chatbot-lazy-loader/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/core/Field/Radio_Image_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/core/Field/Media_Gallery_Field.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/core/Container/Nav_Menu_Item_Container.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Widget\\Widget' not found in wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/core/Widget.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Event\\PersistentListener' not found in wp-content/plugins/chatbot-lazy-loader/vendor/htmlburger/carbon-fields/core/Event/SingleEventListener.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/crb_carbon_fields_container_chatbot_lazy_loader.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_chatbot_lazy_loader.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

chatbot-lazy-loader/chatbot-lazy-loader.php 92% from 13 tests

The entry point to "Chatbot Lazy Loader" version 1.1.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

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
No dangerous file extensions were detected40,067 lines of code in 535 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1905,3068,70313,235
PHP2412,8307,12010,786
JSON70010,505
Sass5434601,885
CSS193391,2391,813
PO File206107791,652
Bourne Shell12111123
Markdown324068

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces5
Traits0
Classes217
▷ Abstract classes125.53%
▷ Concrete classes20594.47%
▷ Final classes10.49%
Methods975
▷ Static methods909.23%
▷ Public methods77078.97%
▷ Protected methods19620.10%
▷ Private methods90.92%
Functions121
▷ Named functions3629.75%
▷ Anonymous functions8570.25%
Constants31
▷ Global constants516.13%
▷ Class constants2683.87%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.29MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/crisp.png9.95KB6.05KB▼ 39.20%
dist/images/tawk.png23.41KB13.17KB▼ 43.72%
dist/images/intercom.png67.57KB28.94KB▼ 57.17%
dist/images/drift.png48.90KB26.27KB▼ 46.28%
dist/images/frogged.png24.71KB12.68KB▼ 48.67%