79% whois-xml-api-whois

Code Review | Whois XML API Whois

WordPress plugin Whois XML API Whois scored79%from 54 tests.

About plugin

  • Plugin page: whois-xml-api-whois
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: May 22, 2019
  • Number of updates: 4
  • Update frequency: every 19.2 days
  • Top authors: whoisxmlapi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.68ms] Passed 4 tests

A check of server-side resources used by Whois XML API Whois
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.24 ▼1.10
Dashboard /wp-admin3.35 ▲0.0444.30 ▼5.43
Posts /wp-admin/edit.php3.46 ▲0.1045.66 ▼7.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.39 ▼4.33
Media Library /wp-admin/upload.php3.27 ▲0.0434.31 ▼0.23
Whois XML API Whois settings /wp-admin/options-general.php?page=whoisxmlapicom-whois-plugin3.2431.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Whois XML API Whois
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14713.79 ▼0.656.38 ▲4.6437.47 ▼8.64
Dashboard /wp-admin2,210 ▲225.88 ▲0.02102.02 ▼12.3939.43 ▼3.63
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0339.34 ▲2.1840.18 ▲6.56
Add New Post /wp-admin/post-new.php1,546 ▲1723.37 ▲0.19659.75 ▲27.7357.56 ▲2.89
Media Library /wp-admin/upload.php1,392 ▲104.25 ▲0.0996.65 ▼0.4642.66 ▲0.73
Whois XML API Whois settings /wp-admin/options-general.php?page=whoisxmlapicom-whois-plugin7952.0324.9827.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/whois-xml-api-whois/whois-xml-api-whois.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/whois-xml-api-whois/src/WhoisXmlApiCom_Whois_Plugin.php:3

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: comments, links, whois, whoisxmlapi, tooltip...

whois-xml-api-whois/whois-xml-api-whois.php Passed 13 tests

The entry point to "Whois XML API Whois" version 1.0.2 is a PHP file that has certain tags in its header comment area
57 characters long description:
Add WHOIS info for domain names in post text and comments

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
Success! There were no dangerous files found in this plugin2,994 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27321,2142,369
CSS36344325
PHP45913300

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1583.33%
▷ Protected methods316.67%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.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
No PNG images were found in this plugin