68% feedback-modal-for-website

Code Review | Feedback Modal for Website

WordPress plugin Feedback Modal for Website scored68%from 54 tests.

About plugin

  • Plugin page: feedback-modal-fo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2020
  • Latest release: Apr 18, 2021
  • Number of updates: 13
  • Update frequency: every 35.2 days
  • Top authors: nedwp (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /3,562 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▲156.01ms] Passed 4 tests

Server-side resources used by Feedback Modal for Website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.83 ▲1.30
Dashboard /wp-admin3.87 ▲0.53287.47 ▲227.78
Posts /wp-admin/edit.php3.92 ▲0.57320.53 ▲275.97
Add New Post /wp-admin/post-new.php6.39 ▲0.51309.55 ▲216.89
Media Library /wp-admin/upload.php3.73 ▲0.51210.16 ▲178.07
Settings /wp-admin/admin.php?page=nedwp-feedback-modal3.71288.09
Feedback /wp-admin/admin.php?page=nedwp-feedback-modal-list3.71262.97

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 47 new files
Database: 1 new table, 13 new options
New tables
wp_nedwp_fm
New WordPress options
nedwp_fm_general
nedwp_fm_modal
widget_recent-posts
nedwp_fm_notifs
nedwp_fm_install_date
nedwp_fm_styles
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
...

Browser metrics Passed 4 tests

Feedback Modal for Website: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,262 ▲51613.99 ▼0.4113.61 ▲11.8971.53 ▲30.05
Dashboard /wp-admin2,239 ▲545.86 ▼0.04103.42 ▲0.6735.05 ▼6.11
Posts /wp-admin/edit.php2,116 ▲272.00 ▲0.0134.93 ▼1.7032.42 ▼3.26
Add New Post /wp-admin/post-new.php1,539 ▲1723.38 ▲0.05671.83 ▲2.2956.17 ▼0.07
Media Library /wp-admin/upload.php1,418 ▲304.19 ▼0.01102.13 ▲3.3849.32 ▲5.58
Settings /wp-admin/admin.php?page=nedwp-feedback-modal1,2622.3141.3429.40
Feedback /wp-admin/admin.php?page=nedwp-feedback-modal-list9902.1036.9026.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_nedwp_fm
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • nedwp_fm_modal
    • nedwp_fm_install_date
    • widget_theysaidso_widget
    • can_compress_scripts
    • nedwp_fm_notifs
    • nedwp_fm_messages
    • nedwp_fm_styles
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/feedback-modal-for-website/inc/public/views/screen-loader.php
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/feedback-modal-for-website/inc/public/views/screen-done.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/feedback-modal-for-website/inc/admin/views/list-view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nedwp_fm_opt() in wp-content/plugins/feedback-modal-for-website/inc/public/views/screen-email.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nedwp_fm_opt() in wp-content/plugins/feedback-modal-for-website/inc/public/views/screen-fb.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/feedback-modal-for-website/inc/admin/list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nedwp_fm_opt() in wp-content/plugins/feedback-modal-for-website/inc/public/views/main-view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/feedback-modal-for-website/inc/admin/views/main-view.php:3
    • > PHP Warning
      Use of undefined constant NEDWP_FM_DIR - assumed 'NEDWP_FM_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/feedback-modal-for-website/inc/admin/main.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'NEDWP_FM_DIRinc/admin/list.php' (include_path='.:/usr/share/php') in wp-content/plugins/feedback-modal-for-website/inc/admin/main.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/feedback-modal-for-website/inc/public/views/action-submit.php:3

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 Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: modal contact, modal-popup, contact, comments, visual feedback...

feedback-modal-for-website/nedwp-feedback-modal.php 85% from 13 tests

The main PHP file in "Feedback Modal for Website" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("feedback-modal-for-website.php" instead of "nedwp-feedback-modal.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin9,075 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
SVG3004,674
PHP22521823,037
CSS3160551,102
JavaScript31009262

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity25.33
▷ Minimum class complexity5.00
▷ Maximum class complexity76.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods70
▷ Static methods34.29%
▷ Public methods6795.71%
▷ Protected methods11.43%
▷ Private methods22.86%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.06MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/nedwp.png22.66KB2.47KB▼ 89.09%
assets/imgs/theme.png43.38KB7.87KB▼ 81.87%