77% suggestion-toolkit

Code Review | Suggestion Toolkit

WordPress plugin Suggestion Toolkit scored77%from 54 tests.

About plugin

  • Plugin page: suggestion-toolkit
  • Plugin version: 5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 24, 2021
  • Latest release: Aug 27, 2022
  • Number of updates: 14
  • Update frequency: every 33.8 days
  • Top authors: dzysyak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /431 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▲8.89ms] 75% from 4 tests

Analyzing server-side resources used by Suggestion Toolkit
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,039.39ms on /wp-admin/admin.php?page=suggestion-toolkit-extensions)
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4050.61 ▲13.77
Dashboard /wp-admin3.73 ▲0.4267.19 ▲18.04
Posts /wp-admin/edit.php3.82 ▲0.4754.47 ▼0.77
Add New Post /wp-admin/post-new.php6.28 ▲0.3998.68 ▲7.11
Media Library /wp-admin/upload.php3.65 ▲0.4250.17 ▲15.46
Support /wp-admin/admin.php?page=suggestion-toolkit-support3.6241.24
Extensions /wp-admin/admin.php?page=suggestion-toolkit-extensions3.701,039.39
Settings /wp-admin/admin.php?page=suggestion-toolkit3.6241.65

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 16 new options
New WordPress options
widget_recent-posts
suggestion_toolkit_more
suggestion_toolkit_rewrite_enable
widget_suggestiontoolkit_wp_widget
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
suggestion_toolkit_enabled_types
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Suggestion Toolkit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12513.29 ▼1.472.64 ▲0.1444.87 ▼0.33
Dashboard /wp-admin2,244 ▲564.84 ▲0.02101.56 ▼5.0043.24 ▼6.35
Posts /wp-admin/edit.php2,127 ▲382.05 ▲0.0436.01 ▼3.2332.70 ▼2.68
Add New Post /wp-admin/post-new.php1,678 ▲15922.81 ▼0.45640.64 ▼57.1935.36 ▼30.83
Media Library /wp-admin/upload.php1,423 ▲354.24 ▲0.03105.67 ▼7.8743.44 ▲0.36
Support /wp-admin/admin.php?page=suggestion-toolkit-support8832.0526.6427.93
Extensions /wp-admin/admin.php?page=suggestion-toolkit-extensions2,0142.1925.2933.94
Settings /wp-admin/admin.php?page=suggestion-toolkit1,3052.0624.8129.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 16 options in the database
    • widget_recent-comments
    • suggestion_toolkit_num_suggestions
    • widget_theysaidso_widget
    • suggestion_toolkit_cache_expiration
    • widget_suggestiontoolkit_wp_widget
    • suggestion_toolkit_rewrite_enable
    • suggestion_toolkit_append_random
    • widget_recent-posts
    • suggestion_toolkit_title_words
    • suggestion_toolkit_enabled_types
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/suggestion-toolkit/widgets/elementor-suggestion-toolkit.php
    • > /wp-content/plugins/suggestion-toolkit/widgets/wp-suggestion-toolkit.php
    • > /wp-content/plugins/suggestion-toolkit/index.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: r_posts in wp-content/plugins/suggestion-toolkit/styles/tpl.post.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/suggestion-toolkit/styles/tpl.block-wrap.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/suggestion-toolkit/styles/tpl.post.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% 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
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #5, #6, #7 in suggestion-toolkit/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

suggestion-toolkit/index.php 85% from 13 tests

Analyzing the main PHP file in "Suggestion Toolkit" version 5.0
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 307 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("suggestion-toolkit.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,036 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP63311841,687
SVG8111,057
CSS216863653
JavaScript38021639

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity59.75
▷ Minimum class complexity10.00
▷ Maximum class complexity98.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods4591.84%
▷ Protected methods36.12%
▷ Private methods12.04%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin