62% whois-dashboard-widget

Code Review | Whois Dashboard Widget

WordPress plugin Whois Dashboard Widget scored62%from 54 tests.

About plugin

  • Plugin page: whois-dashboard-w...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Mar 10, 2014
  • Latest release: Mar 11, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: BenRacicot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,766 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.88ms] Passed 4 tests

A check of server-side resources used by Whois Dashboard Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.34 ▼35.20
Dashboard /wp-admin2.05 ▼1.265.14 ▼46.84
Posts /wp-admin/edit.php2.05 ▼1.315.34 ▼44.60
Add New Post /wp-admin/post-new.php2.05 ▼3.845.09 ▼92.89
Media Library /wp-admin/upload.php2.05 ▼1.185.93 ▼29.64
Menu Text /wp-admin/options-general.php?page=whoisdashboard2.056.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Whois Dashboard Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.49 ▼0.537.87 ▲6.0743.58 ▲4.06
Dashboard /wp-admin2,256 ▲765.55 ▼0.0384.49 ▼7.0677.67 ▲33.85
Posts /wp-admin/edit.php2,112 ▲152.01 ▲0.0239.22 ▲2.7135.51 ▼0.88
Add New Post /wp-admin/post-new.php1,536 ▲1022.78 ▼0.62649.19 ▲44.2048.13 ▼3.74
Media Library /wp-admin/upload.php1,409 ▲94.23 ▲0.0698.40 ▲0.6642.41 ▼2.69
Menu Text /wp-admin/options-general.php?page=whoisdashboard7781.7030.0527.34

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
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the whois-ajax-request handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=whoisdashboard
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the whois-ajax-request handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/whois-dashboard-widget/public/views/public.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/whois-dashboard-widget/admin/views/admin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/whois-dashboard-widget/public/whoisdashboardwidget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: links, whois, domaintools, tooltip, dashboard...

whois-dashboard-widget/whois-dashboard.php 77% from 13 tests

The main file in "Whois Dashboard Widget" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("whois-dashboard-widget.php" instead of "whois-dashboard.php")
  • Description: A good plugin description is longer than 10 characters (currently 5 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected453 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8123437407
JavaScript310243
Markdown1103
CSS2020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods728.00%
▷ Public methods1976.00%
▷ Protected methods00.00%
▷ Private methods624.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.47MB with 0.30MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png450.52KB105.76KB▼ 76.52%
assets/banner-1544x500.png23.10KB9.63KB▼ 58.33%
assets/banner-772x250.png11.50KB5.06KB▼ 56.00%