88% jotform-feedback-button

Code Review | Jotform Feedback Button

WordPress plugin Jotform Feedback Button scored 88% from 54 tests.

About plugin

  • Plugin page: jotform-feedback-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 5.8.1
  • First release: May 30, 2013
  • Latest release: Oct 11, 2021
  • Number of updates: 32
  • Update frequency: every 96.7 days
  • Top authors: jotform (75%)eeertekin (18.75%)paul_simpson (12.5%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active / 18,912 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼145.83ms] Passed 4 tests

Analyzing server-side resources used by Jotform Feedback Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1335.52 ▲15.49
Dashboard /wp-admin3.08 ▲0.0238.35 ▼2.83
Posts /wp-admin/edit.php3.13 ▲0.0245.81 ▲3.11
Add New Post /wp-admin/post-new.php5.44 ▲0.0081.38 ▼590.53
Media Library /wp-admin/upload.php3.03 ▲0.0232.94 ▲6.93
Jotform Feedback Button /wp-admin/options-general.php?page=jotform-feedback3.0129.42

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Jotform Feedback Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲23216.41 ▲0.8818.50 ▲6.8954.27 ▲4.98
Dashboard /wp-admin2,975 ▲415.89 ▼0.07134.18 ▼11.37107.65 ▼4.69
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0163.66 ▼2.7496.42 ▲8.87
Add New Post /wp-admin/post-new.php1,675 ▲318.87 ▲0.00370.01 ▼20.11114.93 ▲10.96
Media Library /wp-admin/upload.php1,812 ▲85.03 ▼0.01155.61 ▲17.92117.92 ▼4.39
Jotform Feedback Button /wp-admin/options-general.php?page=jotform-feedback1,7333.1578.1776.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=jotform-feedback
    • > Notice in wp-content/plugins/jotform-feedback-button/jotform-wp-feedback-options.php+11
    Undefined index: formID

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jotform-feedback-button/jotform-wp-feedback.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/jotform-feedback-button/jotform-wp-feedback-options.php:2

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

jotform-feedback-button/jotform-wp-feedback.php 92% from 13 tests

The main PHP file in "Jotform Feedback Button" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("jotform-feedback-button.php" instead of "jotform-wp-feedback.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected201 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2309180
JavaScript16921

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/feedback32x32.png2.00KB1.24KB▼ 38.00%
images/browse-icon22x22.png1.66KB0.71KB▼ 57.08%