61% best-suggestion-boxes

Code Review | WOW Best Suggestion Boxes

WordPress plugin WOW Best Suggestion Boxes scored 61% from 54 tests.

About plugin

  • Plugin page: best-suggestion-b...
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2021
  • Latest release: Oct 30, 2022
  • Number of updates: 20
  • Update frequency: every 22.0 days
  • Top authors: baonguyenyam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,374 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
Install script ran successfully

Server metrics [RAM: ▲0.89MB] [CPU: ▼3.88ms] Passed 4 tests

Server-side resources used by WOW Best Suggestion Boxes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.02 ▲1.5654.98 ▲10.85
Dashboard /wp-admin4.92 ▲1.6264.72 ▲13.90
Posts /wp-admin/edit.php4.99 ▲1.6360.05 ▲8.46
Add New Post /wp-admin/post-new.php4.72 ▼1.1646.24 ▼48.72
Media Library /wp-admin/upload.php4.77 ▲1.5550.34 ▲16.56
Suggestions /wp-admin/admin.php?page=best-suggestion-boxes4.7747.95
Add New Screen /wp-admin/admin.php?page=best-suggestion-boxes-screen4.7746.30
Add New Suggest /wp-admin/admin.php?page=best-suggestion-boxes-suggest4.8147.92

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 492 new files
Database: 2 new tables, 6 new options
New tables
wp_best_suggestion_boxes_suggest
wp_best_suggestion_boxes_suggest_group
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WOW Best Suggestion Boxes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,103 ▲33218.42 ▲3.671.70 ▼0.1042.16 ▼1.64
Dashboard /wp-admin2,507 ▲3199.16 ▲4.30179.81 ▲67.7739.34 ▼5.71
Posts /wp-admin/edit.php2,438 ▲3526.16 ▲4.1673.56 ▲36.9528.11 ▼2.44
Add New Post /wp-admin/post-new.php1,618 ▲8519.94 ▼3.39736.76 ▲55.2947.48 ▼30.75
Media Library /wp-admin/upload.php1,555 ▲1706.59 ▲2.41109.47 ▲7.2646.98 ▼0.63
Suggestions /wp-admin/admin.php?page=best-suggestion-boxes1,2816.0866.6324.62
Settings /wp-admin/crb_carbon_fields_container_settings.php260.440.1016.25
Add New Screen /wp-admin/admin.php?page=best-suggestion-boxes-screen1,1555.9060.4821.83
Add New Suggest /wp-admin/admin.php?page=best-suggestion-boxes-suggest1,72910.19150.7845.82

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
These items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_best_suggestion_boxes_suggest_group
    • wp_best_suggestion_boxes_suggest
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 119× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Event\\Listener' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Event/PersistentListener.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Equality_Comparer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Container/Nav_Menu_Item_Container.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Parent_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/templates/Container/term_meta.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\File_Field' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Field/Image_Field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Field/Complex_Field.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/templates/Container/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Term_Condition' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Term_Condition.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Datastore\\Datastore_Interface' not found in wp-content/plugins/best-suggestion-boxes/vendor/htmlburger/carbon-fields/core/Datastore/Datastore.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/crb_carbon_fields_container_settings.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === best-suggestion-boxes === )
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in best-suggestion-boxes/assets to your readme.txt
The official readme.txt is a good inspiration

best-suggestion-boxes/nguyen-app.php 92% from 13 tests

Analyzing the main PHP file in "WOW Best Suggestion Boxes" version 2.0.2
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("best-suggestion-boxes.php" instead of "nguyen-app.php")

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
Everything looks great! No dangerous files found in this plugin28,589 lines of code in 427 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1755,1988,55112,986
PHP1582,6487,0769,362
PO File278561,0642,293
Sass4833901,769
CSS103251,1471,686
JSON400360
Markdown432091
SVG10142

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.26
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces22
Interfaces5
Traits0
Classes128
▷ Abstract classes118.59%
▷ Concrete classes11791.41%
▷ Final classes10.85%
Methods945
▷ Static methods919.63%
▷ Public methods76881.27%
▷ Protected methods16517.46%
▷ Private methods121.27%
Functions106
▷ Named functions2422.64%
▷ Anonymous functions8277.36%
Constants32
▷ Global constants928.12%
▷ Class constants2371.88%
▷ Public constants23100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.77MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screen-shot-2.png25.27KB6.68KB▼ 73.58%
assets/screen-shot-4.png69.15KB20.31KB▼ 70.63%
assets/icon-256x256.png5.16KB2.89KB▼ 43.98%
assets/screen-shot-3.png77.13KB21.63KB▼ 71.95%
assets/banner-772x250-rtl.png77.96KB38.24KB▼ 50.95%