83% website-toolbox-forums

Code Review | Website Toolbox Community

WordPress plugin Website Toolbox Community scored83%from 54 tests.

About plugin

  • Plugin page: website-toolbox-f...
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2012
  • Latest release: Aug 10, 2023
  • Number of updates: 178
  • Update frequency: every 21.9 days
  • Top authors: websitetoolbox (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

100+ active /57,961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.79ms] Passed 4 tests

This is a short check of server-side resources used by Website Toolbox Community
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.79 ▼5.74
Dashboard /wp-admin3.41 ▲0.1146.13 ▼1.58
Posts /wp-admin/edit.php3.45 ▲0.1046.08 ▼5.78
Add New Post /wp-admin/post-new.php6.11 ▲0.22553.10 ▲452.73
Media Library /wp-admin/upload.php3.35 ▲0.1337.47 ▲1.93
Website Toolbox Community /wp-admin/options-general.php?page=websitetoolboxoptions3.2832.71

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Website Toolbox Community: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.18 ▼1.111.63 ▼0.3441.55 ▼7.89
Dashboard /wp-admin2,214 ▲235.03 ▲0.16104.12 ▼0.8139.17 ▼3.35
Posts /wp-admin/edit.php2,097 ▲82.01 ▲0.0335.02 ▼5.1933.19 ▼1.80
Add New Post /wp-admin/post-new.php1,522 ▼1117.88 ▼5.28600.88 ▼69.5248.97 ▲2.60
Media Library /wp-admin/upload.php1,396 ▲54.34 ▲0.1893.87 ▼5.4443.22 ▼0.97
Website Toolbox Community /wp-admin/options-general.php?page=websitetoolboxoptions8282.1822.8225.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/website-toolbox-forums/forumHook.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/website-toolbox-forums/forumHook.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

website-toolbox-forums/websitetoolbox.php 85% from 13 tests

"Website Toolbox Community" version 1.9.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 164 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("website-toolbox-forums.php" instead of "websitetoolbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,849 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP61643582,290
CSS2240274
JavaScript230265
SVG11120

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions92
▷ Named functions8693.48%
▷ Anonymous functions66.52%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/wp-settingpage.png46.98KB23.99KB▼ 48.93%
img/wp-settingpage (1) .png46.98KB23.99KB▼ 48.93%
admin/images/embedComments.png27.53KB9.67KB▼ 64.85%