78% anyway-feedback

Code Review | Anyway Feedback

WordPress plugin Anyway Feedback scored78%from 54 tests.

About plugin

  • Plugin page: anyway-feedback
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 6.3.1
  • First release: Jul 3, 2011
  • Latest release: Dec 8, 2014
  • Number of updates: 14
  • Update frequency: every 89.7 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.79ms] Passed 4 tests

Server-side resources used by Anyway Feedback
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.50 ▼4.54
Dashboard /wp-admin3.34 ▲0.0446.53 ▼5.88
Posts /wp-admin/edit.php3.45 ▲0.1046.65 ▲3.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.63 ▼12.53
Media Library /wp-admin/upload.php3.26 ▲0.0436.57 ▲4.37
Anyway Feedback /wp-admin/options-general.php?page=anyway-feedback3.2932.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 58 new files
Database: 1 new table, 8 new options
New tables
wp_afb_feedbacks
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
afb_db_version
widget_recent-comments
db_upgraded
widget_anyway-feedback-popular-widgets

Browser metrics Passed 4 tests

An overview of browser requirements for Anyway Feedback
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.34 ▼1.094.17 ▲2.4539.68 ▼6.21
Dashboard /wp-admin2,210 ▲214.86 ▼0.09113.11 ▼9.9243.86 ▼2.57
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0039.78 ▲3.7735.19 ▲0.29
Add New Post /wp-admin/post-new.php1,536 ▲2223.26 ▲5.71648.15 ▼24.2558.81 ▼2.04
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.0595.18 ▼0.8341.92 ▲1.13
Anyway Feedback /wp-admin/options-general.php?page=anyway-feedback1,1222.2228.0532.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_anyway-feedback-popular-widgets
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Pattern\\Singleton' not found in wp-content/plugins/anyway-feedback/app/Pattern/Controller.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/anyway-feedback/app/Widget/Popular.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/anyway-feedback/app/Admin/Table.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Pattern\\Controller' not found in wp-content/plugins/anyway-feedback/app/Main.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Pattern\\Singleton' not found in wp-content/plugins/anyway-feedback/app/Model/Base.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anyway-feedback/anyway-feedback.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Model\\Base' not found in wp-content/plugins/anyway-feedback/app/Model/FeedBacks.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Pattern\\Singleton' not found in wp-content/plugins/anyway-feedback/app/Helper/i18n.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Pattern\\Controller' not found in wp-content/plugins/anyway-feedback/app/Admin/Screen.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AFB\\Pattern\\Singleton' not found in wp-content/plugins/anyway-feedback/app/Helper/Input.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=anyway-feedback
    • > Javascript (severe) in unknown
    /wp-content/plugins/anyway-feedback/assets/js/admin-script.js?ver=0.8 31:4 Uncaught ReferenceError: AFB is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Tested up to: Version format is invalid
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Controller looks like this. You can customize it with your own css and markup.), #2 (Super cool statistic summary in admin panel! Yeah!), #3 (Simple setting. Documentations are also on admin screen!)
Please take inspiration from this readme.txt

anyway-feedback/anyway-feedback.php Passed 13 tests

This is the main PHP file of "Anyway Feedback" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
79 characters long description:
Help to assemble simple feedback(negative or positive) and get statics of them.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,182 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP182117141,356
JavaScript710677656
PO File1104125297
Sass2215268
Markdown41330229
CSS21160208
JSON400114
HTML20034
Ruby15610
YAML10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.20
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes10
▷ Abstract classes330.00%
▷ Concrete classes770.00%
▷ Final classes00.00%
Methods73
▷ Static methods11.37%
▷ Public methods6082.19%
▷ Protected methods1216.44%
▷ Private methods11.37%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.50MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/undo.png0.61KB0.75KB0.00%
screenshot-3.png229.26KB62.79KB▼ 72.61%
assets/img/smallbutton.png0.14KB0.19KB0.00%
screenshot-2.png190.09KB52.46KB▼ 72.40%
screenshot-1.png87.34KB23.67KB▼ 72.90%