83% ybug-feedback-widget

Code Review | Ybug Feedback Widget

WordPress plugin Ybug Feedback Widget scored83%from 54 tests.

About plugin

  • Plugin page: ybug-feedback-widget
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2020
  • Latest release: Nov 21, 2022
  • Number of updates: 9
  • Update frequency: every 107.1 days
  • Top authors: ybug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,212 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼14.18ms] Passed 4 tests

Server-side resources used by Ybug Feedback Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0741.60 ▼5.82
Dashboard /wp-admin3.41 ▲0.0350.97 ▼33.56
Posts /wp-admin/edit.php3.53 ▲0.1351.02 ▼2.61
Add New Post /wp-admin/post-new.php5.99 ▲0.0786.93 ▼14.74
Media Library /wp-admin/upload.php3.34 ▲0.0739.07 ▲2.57
Ybug /wp-admin/options-general.php?page=ybug3.2832.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Ybug Feedback Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲4014.35 ▲0.181.66 ▼0.0344.00 ▲1.51
Dashboard /wp-admin2,203 ▲295.61 ▲0.0485.13 ▼6.1042.49 ▲0.80
Posts /wp-admin/edit.php2,111 ▲111.99 ▼0.0234.30 ▼7.5136.59 ▼3.06
Add New Post /wp-admin/post-new.php1,533 ▲523.23 ▼0.24674.44 ▲18.1348.43 ▼7.00
Media Library /wp-admin/upload.php1,405 ▲24.20 ▲0.0399.12 ▼1.9843.47 ▲0.91
Ybug /wp-admin/options-general.php?page=ybug9182.1925.9031.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ybug
    • > Notice in wp-content/plugins/ybug-feedback-widget/admin/class-ybug-admin.php+151
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=ybug
    • > Notice in wp-content/plugins/ybug-feedback-widget/admin/class-ybug-admin.php+76
    Undefined index: roles

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: feedback widget, visual feedback, screenshot, user feedback, feedback...

ybug-feedback-widget/ybug.php 69% from 13 tests

The primary PHP file in "Ybug Feedback Widget" version 1.1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ybug-feedback-widget.php" instead of "ybug.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected334 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9127403285
SVG20026
JavaScript11014
CSS1109

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods13.57%
▷ Private methods414.29%
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
No PNG images were found in this plugin