71% gleap

Code Review | Gleap

WordPress plugin Gleap scored71%from 54 tests.

About plugin

  • Plugin page: gleap
  • Plugin version: 11.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2021
  • Latest release: Jul 31, 2023
  • Number of updates: 20
  • Update frequency: every 32.1 days
  • Top authors: gleap (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /3,794 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.44MB] [CPU: ▲9.19ms] Passed 4 tests

An overview of server-side resources used by Gleap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.91 ▲1.4550.04 ▲3.29
Dashboard /wp-admin4.74 ▲1.4461.98 ▲11.50
Posts /wp-admin/edit.php4.79 ▲1.4462.21 ▲11.44
Add New Post /wp-admin/post-new.php7.34 ▲1.45105.71 ▲10.53
Media Library /wp-admin/upload.php4.64 ▲1.4148.58 ▲13.57

Server storage [IO: ▲14.75MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • You have illegally modified 2 files (0.00KB) outside of "wp-content/plugins/gleap/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/gleap/assets/banner-772\303\227250.png"
    • (new file) "wp-content/plugins/gleap/assets/banner-1544\303\227500.png"
Filesystem: 483 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Gleap
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲22419.01 ▲4.661.89 ▲0.0839.67 ▼17.91
Dashboard /wp-admin2,380 ▲1929.35 ▲4.49229.50 ▲119.6742.85 ▲4.20
Posts /wp-admin/edit.php2,298 ▲2066.19 ▲4.1584.31 ▲38.3833.83 ▼2.54
Add New Post /wp-admin/post-new.php1,584 ▲6519.27 ▼4.11698.39 ▲96.2941.54 ▼12.89
Media Library /wp-admin/upload.php1,434 ▲496.84 ▲2.64171.93 ▲73.3753.99 ▲11.50
Gleap /wp-admin/crb_carbon_fields_container_gleap.php260.440.0914.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/gleap/admin/partials/gleap-admin-display.php
    • > /wp-content/plugins/gleap/public/partials/gleap-public-display.php
  • 113× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Nav_Menu_Item_Container.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Block_Container.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Ancestor_ID_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Term_Condition' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Ancestor_Condition.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Fulfillable\\Translator\\Array_Translator' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Translator/Json_Translator.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Field/Gravity_Form_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/core/Container/Condition/Boolean_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gleap/vendor/htmlburger/carbon-fields/templates/Container/post_meta.php:1

User-side errors 0% from 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #7 (Customer surveys), #8 (Live chat)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === gleap === )
Please take inspiration from this readme.txt

gleap/gleap.php 92% from 13 tests

The main file in "Gleap" v. 11.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

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
Good job! No executable or dangerous file extensions detected32,263 lines of code in 421 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1727,09610,94116,171
PHP1582,6787,3519,336
CSS92401,1652,221
PO File268191,0202,202
Sass4836311,857
JSON400383
Markdown324068
SVG10025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.52
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces5
Traits0
Classes129
▷ Abstract classes118.53%
▷ Concrete classes11891.47%
▷ Final classes10.85%
Methods946
▷ Static methods10911.52%
▷ Public methods76981.29%
▷ Protected methods16517.44%
▷ Private methods121.27%
Functions107
▷ Named functions2422.43%
▷ Anonymous functions8377.57%
Constants31
▷ Global constants619.35%
▷ Class constants2580.65%
▷ Public constants25100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 4.97MB with 3.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png677.68KB234.13KB▼ 65.45%
assets/screenshot-4.png674.78KB227.09KB▼ 66.35%
assets/screenshot-5.png1,052.20KB355.42KB▼ 66.22%
assets/banner-772×250.png103.53KB39.02KB▼ 62.32%
assets/icon-128x128.png6.36KB3.02KB▼ 52.48%