68% wiflydemofeedbackcomposer

Code Review | WiflyDemoFeedbackComposer

WordPress plugin WiflyDemoFeedbackComposer scored68%from 54 tests.

About plugin

  • Plugin page: wiflydemofeedback...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2023
  • Latest release: Mar 27, 2023
  • Number of updates: 6
  • Update frequency: every 7.8 days
  • Top authors: davidaawow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /150 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼2.19MB] [CPU: ▼64.84ms] Passed 4 tests

An overview of server-side resources used by WiflyDemoFeedbackComposer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.646.00 ▼43.81
Dashboard /wp-admin2.11 ▼1.525.58 ▼61.31
Posts /wp-admin/edit.php2.11 ▼1.576.38 ▼48.04
Add New Post /wp-admin/post-new.php2.11 ▼4.045.72 ▼106.18
Media Library /wp-admin/upload.php2.11 ▼1.387.12 ▼28.97
Feedback page /wp-admin/admin.php?page=feedback_page2.116.12
How does it work? /wp-admin/admin.php?page=faq2.117.04
Settings /wp-admin/admin.php?page=settings_page2.115.24

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: 2 new tables, 6 new options
New tables
wp_feedback
wp_feedback_category
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WiflyDemoFeedbackComposer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.52 ▼0.865.21 ▲3.5439.02 ▼1.33
Dashboard /wp-admin2,229 ▲525.81 ▲0.0995.82 ▲5.7134.54 ▼10.41
Posts /wp-admin/edit.php2,137 ▲372.50 ▲0.4735.97 ▼6.7729.57 ▼5.55
Add New Post /wp-admin/post-new.php1,710 ▲18422.91 ▲5.32688.83 ▼24.9867.04 ▲11.92
Media Library /wp-admin/upload.php1,504 ▲1074.46 ▲0.28112.98 ▲10.3946.00 ▼0.24
Feedback page /wp-admin/admin.php?page=feedback_page8191.9026.0921.20
How does it work? /wp-admin/admin.php?page=faq8462.0525.0426.98
Settings /wp-admin/admin.php?page=settings_page8371.9324.7021.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap-icons handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap-icons handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WIFLY_DEMO_FEEDBACK_PLUGIN_DIR - assumed 'WIFLY_DEMO_FEEDBACK_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wiflydemofeedbackcomposer/templates/settings-page.php on line 8
    • > PHP Fatal error
      require(): Failed opening required 'WIFLY_DEMO_FEEDBACK_PLUGIN_DIR/providers/class.feedback.provider.php' (include_path='.:/usr/share/php') in wp-content/plugins/wiflydemofeedbackcomposer/templates/admin-page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wiflydemofeedbackcomposer/templates/faq-page.php:6
    • > PHP Warning
      require_once(WIFLY_DEMO_FEEDBACK_PLUGIN_DIRproviders/class.feedback.provider.php): failed to open stream: No such file or directory in wp-content/plugins/wiflydemofeedbackcomposer/templates/settings-page.php on line 8
    • > PHP Warning
      require(WIFLY_DEMO_FEEDBACK_PLUGIN_DIR/providers/class.feedback.provider.php): failed to open stream: No such file or directory in wp-content/plugins/wiflydemofeedbackcomposer/templates/admin-page.php on line 4
    • > PHP Warning
      Use of undefined constant WIFLY_DEMO_FEEDBACK_PLUGIN_DIR - assumed 'WIFLY_DEMO_FEEDBACK_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wiflydemofeedbackcomposer/templates/admin-page.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'WIFLY_DEMO_FEEDBACK_PLUGIN_DIRproviders/class.feedback.provider.php' (include_path='.:/usr/share/php') in wp-content/plugins/wiflydemofeedbackcomposer/templates/settings-page.php on line 8

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: shortcode, custom post, widget, display custom fields, custom fields in frontend...

wiflydemofeedbackcomposer/wifly-demo-feedback-composer.php 92% from 13 tests

The main PHP script in "WiflyDemoFeedbackComposer" version 1.0.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wiflydemofeedbackcomposer.php" instead of "wifly-demo-feedback-composer.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
Everything looks great! No dangerous files found in this plugin2,383 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS2262,017
PHP106920340
Markdown117025
JavaScript1061

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27100.00%
▷ Public methods2488.89%
▷ Protected methods00.00%
▷ Private methods311.11%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/images/feedback_image.png79.93KB40.73KB▼ 49.04%
static/images/settings_image.png19.58KB9.23KB▼ 52.86%