10% dnslt

Code Review | dnsLT Free domain name whois

WordPress plugin dnsLT Free domain name whois scored10%from 54 tests.

About plugin

  • Plugin page: dnslt
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Feb 2, 2021
  • Latest release: Feb 2, 2021
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: codesbee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /932 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dnslt/index.php+80
    Non-static method Dnslt::active_deactive() should not be called statically

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

Server-side resources used by dnsLT Free domain name whois
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.93 ▼36.20
Dashboard /wp-admin2.05 ▼1.265.80 ▼41.97
Posts /wp-admin/edit.php2.05 ▼1.315.65 ▼42.30
Add New Post /wp-admin/post-new.php2.05 ▼3.845.45 ▼91.69
Media Library /wp-admin/upload.php2.05 ▼1.185.34 ▼30.77
dnsLT /wp-admin/options-general.php?page=dnslt2.055.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
dnslt_search_background
can_compress_scripts

Browser metrics Passed 4 tests

dnsLT Free domain name whois: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▲0.191.92 ▼0.3544.34 ▼4.53
Dashboard /wp-admin2,213 ▲285.86 ▲0.9994.43 ▼7.8139.25 ▲1.31
Posts /wp-admin/edit.php2,093 ▲72.00 ▼0.0434.87 ▼4.3932.88 ▲1.60
Add New Post /wp-admin/post-new.php1,536 ▼123.42 ▼0.03681.23 ▲0.1561.69 ▲10.03
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.05106.11 ▼2.4645.79 ▼2.63
dnsLT /wp-admin/options-general.php?page=dnslt8422.2733.5525.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dnslt/index.php+80
    Non-static method Dnslt::active_deactive() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > Deprecated in wp-content/plugins/dnslt/index.php+80
    Non-static method Dnslt::active_deactive() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > Deprecated in wp-content/plugins/dnslt/index.php+81
    Non-static method Dnslt::dnslt_load_scripts() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 dnslt_result_script_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 dnslt_domain_script_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_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 dnslt_defult_js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style 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 dnslt_style_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style 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 dnslt_result_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > Notice in wp-includes/plugin.php+1004
    Undefined offset: 0
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > Deprecated in wp-content/plugins/dnslt/index.php+82
    Non-static method Dnslt::init() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=dnslt
    • > Deprecated in wp-content/plugins/dnslt/index.php+160
    Non-static method DnsltAdmin::init() should not be called statically

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/dnslt/index.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Search widget), #2 (Search result), #3 (Admin setting)
You can take inspiration from this readme.txt

dnslt/index.php 85% from 13 tests

"dnsLT Free domain name whois" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The plugin description must be longer than 10 characters (currently 9 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dnslt.php" instead of "index.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
No dangerous file extensions were detected396 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript310822225
PHP11016135
SVG30134
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
No PNG files were detected