10% quick-whois

Code Review | Quick Whois

WordPress plugin Quick Whois scored10%from 54 tests.

About plugin

  • Plugin page: quick-whois
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Apr 21, 2014
  • Latest release: Jun 2, 2014
  • Number of updates: 18
  • Update frequency: every 2.3 days
  • Top authors: fasterthemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,453 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/quick-whois/quickwhois.php+158
    Methods with the same name as their class will not be constructors in a future version of PHP; whois_widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼58.10ms] Passed 4 tests

Analyzing server-side resources used by Quick Whois
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.06 ▼38.07
Dashboard /wp-admin2.10 ▼1.216.57 ▼50.56
Posts /wp-admin/edit.php2.10 ▼1.265.46 ▼47.45
Add New Post /wp-admin/post-new.php2.10 ▼3.796.18 ▼96.32
Media Library /wp-admin/upload.php2.10 ▼1.135.03 ▼33.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 135 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_whois_widget
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quick Whois
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.35 ▼0.311.74 ▼0.0849.31 ▲3.64
Dashboard /wp-admin2,198 ▲185.63 ▼0.0785.54 ▼9.5640.76 ▲1.57
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0336.69 ▼3.8235.80 ▼0.22
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.33653.83 ▼18.6151.68 ▼2.04
Media Library /wp-admin/upload.php1,403 ▲34.41 ▲0.23102.03 ▼16.8545.10 ▼3.64

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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/quick-whois/quickwhois.php+158
    Methods with the same name as their class will not be constructors in a future version of PHP; whois_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_whois_widget
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/quick-whois/phpwhois/testsuite.php
    • > /wp-content/plugins/quick-whois/phpwhois/whois.cl.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Cannot use string offset as an array in wp-content/plugins/quick-whois/phpwhois/whois.parser.php(370) : eval()'d code:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/quick-whois/phpwhois/whois.servers.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Whois' not found in wp-content/plugins/quick-whois/phpwhois/whois.utils.php:28
    • > PHP Warning
      Use of undefined constant STDIN - assumed 'STDIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/quick-whois/phpwhois/testsuite.php on line 85
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/quick-whois/phpwhois/testsuite.php on line 34
    • > PHP Warning
      fopen(testsuite.txt): failed to open stream: No such file or directory in wp-content/plugins/quick-whois/phpwhois/testsuite.php on line 62
    • > PHP Fatal error
      Uncaught Error: Class 'WhoisClient' not found in wp-content/plugins/quick-whois/phpwhois/whois.gtld.php:33
    • > PHP Warning
      file(./test.txt): failed to open stream: No such file or directory in wp-content/plugins/quick-whois/phpwhois/testsuite.php on line 31
    • > PHP Fatal error
      Uncaught Error: Class 'WhoisClient' not found in wp-content/plugins/quick-whois/phpwhois/whois.ws.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WhoisClient' not found in wp-content/plugins/quick-whois/phpwhois/whois.jp.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: whois, domains

quick-whois/quickwhois.php 92% from 13 tests

The principal PHP file in "Quick Whois" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("quick-whois.php" instead of "quickwhois.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
Success! There were no dangerous files found in this plugin7,133 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1272,0862,8087,130
CSS1013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity5.26
▷ Minimum class complexity1.00
▷ Maximum class complexity192.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes121
▷ Abstract classes00.00%
▷ Concrete classes121100.00%
▷ Final classes00.00%
Methods163
▷ Static methods00.00%
▷ Public methods163100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants120
▷ Global constants120100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
phpwhois/whois.icon.png0.56KB0.49KB▼ 12.96%