83% ht-floating-contact

Code Review | HT Floating Contact

WordPress plugin HT Floating Contact scored83%from 54 tests.

About plugin

  • Plugin page: ht-floating-contact
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 1, 2021
  • Latest release: Apr 1, 2021
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: htorresv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /419 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.02ms] Passed 4 tests

An overview of server-side resources used by HT Floating Contact
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.47 ▼5.74
Dashboard /wp-admin3.32 ▼0.0250.57 ▼13.85
Posts /wp-admin/edit.php3.37 ▲0.0252.71 ▼0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.47 ▼20.21
Media Library /wp-admin/upload.php3.24 ▲0.0238.67 ▲4.59
HT Floating Contact /wp-admin/admin.php?page=ht-floating-contact3.2133.92

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
HTappsFC_facebook
widget_recent-posts
HTappsFC_telegram
widget_recent-comments
HTappsFC_whatsapp
db_upgraded
HTappsFC_plugin_active

Browser metrics Passed 4 tests

This is an overview of browser requirements for HT Floating Contact
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.28 ▼0.081.85 ▲0.1037.48 ▼6.82
Dashboard /wp-admin2,213 ▲365.63 ▼0.0692.72 ▲2.8139.94 ▼2.61
Posts /wp-admin/edit.php2,121 ▲212.03 ▲0.0639.16 ▼1.4935.63 ▼5.90
Add New Post /wp-admin/post-new.php1,541 ▲1323.72 ▲0.51635.22 ▼51.0453.70 ▼6.76
Media Library /wp-admin/upload.php1,412 ▲154.21 ▲0.06103.06 ▲4.6346.91 ▲4.89
HT Floating Contact /wp-admin/admin.php?page=ht-floating-contact8792.0423.2526.32

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • HTappsFC_whatsapp
    • HTappsFC_facebook
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • HTappsFC_plugin_active
    • db_upgraded
    • HTappsFC_telegram
    • can_compress_scripts

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ht-floating-contact/components/btnSplit.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ht-floating-contact/settings/script.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ht-floating-contact/settings/init.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/ht-floating-contact/settings/myOptions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/ht-floating-contact/views/principal.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

ht-floating-contact/description.php 85% from 13 tests

The entry point to "HT Floating Contact" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ht-floating-contact.php" instead of "description.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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 detected204 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP84832188
Markdown14013
CSS2002
JavaScript1011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin