78% smartarget-faq-floating-button

Code Review | Smartarget FAQ

WordPress plugin Smartarget FAQ scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-faq-fl...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 22, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 26
  • Update frequency: every 32.4 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /557 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.07MB] [CPU: ▲1.06ms] Passed 4 tests

Server-side resources used by Smartarget FAQ
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0747.04 ▲8.45
Dashboard /wp-admin3.37 ▲0.0649.63 ▼3.36
Posts /wp-admin/edit.php3.49 ▲0.1245.23 ▲0.03
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.32 ▲5.21
Media Library /wp-admin/upload.php3.30 ▲0.0635.51 ▲2.36
Smartarget FAQ /wp-admin/options-general.php?page=smartarget_faq3.2630.65

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

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

Browser metrics Passed 4 tests

Smartarget FAQ: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16021.36 ▲7.009.20 ▲7.5049.34 ▲5.92
Dashboard /wp-admin2,199 ▲2210.55 ▲5.02179.65 ▲76.3742.55 ▼1.51
Posts /wp-admin/edit.php2,116 ▲167.25 ▲5.30111.86 ▲77.3840.61 ▲7.59
Add New Post /wp-admin/post-new.php1,704 ▲17830.08 ▲7.06667.86 ▼28.8065.22 ▲4.18
Media Library /wp-admin/upload.php1,407 ▲109.65 ▲5.46198.31 ▲86.9144.23 ▼5.31
Smartarget FAQ /wp-admin/options-general.php?page=smartarget_faq2,54110.64226.32131.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • 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)
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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smartarget-faq-floating-button/public/partials/smartarget-faq-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-faq-floating-button/admin/partials/smartarget-faq-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
4 plugin tags: support automatization, faq, frequently asked questions, customer support

smartarget-faq-floating-button/smartarget-faq.php 85% from 13 tests

The main PHP file in "Smartarget FAQ" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smartarget-faq-floating-button.php" instead of "smartarget-faq.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected868 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript654,369642
PHP12130522225
CSS2041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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