10% wp-social-feedback

Code Review | WP Social Feedback

WordPress plugin WP Social Feedback scored 10% from 54 tests.

About plugin

  • Plugin page: wp-social-feedback
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.3.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2012
  • Latest release: Apr 15, 2012
  • Number of updates: 19
  • Update frequency: every 0.7 days
  • Top authors: xgote (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 9,144 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.38ms] Passed 4 tests

Analyzing server-side resources used by WP Social Feedback
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.50 ▼34.81
Dashboard /wp-admin2.05 ▼1.255.55 ▼42.70
Posts /wp-admin/edit.php2.05 ▼1.315.41 ▼42.45
Add New Post /wp-admin/post-new.php2.05 ▼3.845.66 ▼93.54
Media Library /wp-admin/upload.php2.05 ▼1.186.33 ▼27.08
Add New /wp-admin/post-new.php?post_type=request2.055.76
WP Feedback /wp-admin/options-general.php?page=wp_social_feedback/fdb_settings_page.php2.057.41
Feedback /wp-admin/edit.php?post_type=request2.056.66

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: 1 new table, 11 new options
New tables
wp_fdb_votes
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
fdb_version
can_compress_scripts
fdb_form_response
db_upgraded
widget_recent-posts
fdb_form_description
fdb_form_not_logged_in
fdb_jqueryui_theme
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Social Feedback
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,032 ▲29714.16 ▼0.2212.54 ▲10.8856.14 ▲15.37
Dashboard /wp-admin2,242 ▲564.82 ▼0.05107.87 ▼11.1740.23 ▼5.80
Posts /wp-admin/edit.php2,128 ▲362.00 ▼0.0539.58 ▼1.2033.91 ▼4.54
Add New Post /wp-admin/post-new.php1,567 ▲3423.16 ▼0.07601.53 ▼5.1174.43 ▲20.78
Media Library /wp-admin/upload.php1,424 ▲364.17 ▼0.0993.37 ▼1.4040.33 ▼2.20
Add New /wp-admin/post-new.php?post_type=request2,4037.65179.3268.25
WP Feedback /wp-admin/options-general.php?page=wp_social_feedback/fdb_settings_page.php280.440.073.87
Feedback /wp-admin/edit.php?post_type=request1,0972.0030.2727.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • fdb_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=request
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=request
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-social-feedback/templates/admin_icons.css.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-social-feedback/fdb.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/wp-social-feedback/templates/display_requests.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-social-feedback/templates/display_feedback_form.php:3
    • > PHP Warning
      Use of undefined constant FDB_CURRENT_VERSION - assumed 'FDB_CURRENT_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-social-feedback/fdb_settings_page.php on line 2
    • > PHP Warning
      Use of undefined constant FDB_PLUGIN_URL - assumed 'FDB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-social-feedback/templates/admin_icons.css.php on line 3
    • > PHP Warning
      Use of undefined constant FDB_CURRENT_BUILD - assumed 'FDB_CURRENT_BUILD' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-social-feedback/fdb_settings_page.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-social-feedback/fdb_settings_page.php:6
    • > PHP Warning
      Use of undefined constant FDB_PUGIN_NAME - assumed 'FDB_PUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-social-feedback/fdb_settings_page.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=request
    • > Network (severe)
    wp-content/plugins/wp_social_feedback/js/wp_settings_admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=request
    • > Network (severe)
    wp-content/plugins/wp_social_feedback/images/wp_feedback_icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp_social_feedback/fdb_settings_page.php
    • > Network (severe)
    wp-admin/options-general.php?page=wp_social_feedback/fdb_settings_page.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Feedback details), #2 (Feedback form), #3 (Feedback results)
You can look at the official readme.txt

wp-social-feedback/fdb.php 92% from 13 tests

The main file in "WP Social Feedback" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-social-feedback.php" instead of "fdb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin703 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP617699480
CSS1342164
JavaScript15035
PO File151224

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.50MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png334.37KB128.64KB▼ 61.53%
images/featured.png0.55KB0.57KB0.00%
images/icon.png0.68KB0.83KB0.00%
images/wp_feedback_icon.png0.74KB0.74KB▼ 0.79%
screenshot-1.png72.86KB28.05KB▼ 61.50%