84% disable-dns-prefetch

Code Review | Disable DNS prefetch

WordPress plugin Disable DNS prefetch scored84%from 54 tests.

About plugin

  • Plugin page: disable-dns-prefetch
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2020
  • Latest release: Feb 10, 2020
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: dhirajsuthar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.31ms] Passed 4 tests

Analyzing server-side resources used by Disable DNS prefetch
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.26 ▲1.76
Dashboard /wp-admin3.31 ▲0.0045.39 ▼0.41
Posts /wp-admin/edit.php3.36 ▲0.0046.69 ▼5.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.24 ▼7.79
Media Library /wp-admin/upload.php3.23 ▲0.0031.92 ▼3.86

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Disable DNS prefetch
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.381.60 ▼0.2439.84 ▼8.64
Dashboard /wp-admin2,206 ▲215.83 ▼0.05104.29 ▲4.0640.48 ▼2.78
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0257.79 ▲17.6942.47 ▲4.81
Add New Post /wp-admin/post-new.php1,519 ▲223.44 ▲5.79590.15 ▼42.1354.03 ▼2.88
Media Library /wp-admin/upload.php1,391 ▲94.26 ▲0.0596.64 ▲0.6543.31 ▲1.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-dns-prefetch/disable-dns-prefetch.php:10

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: disable dns, remove dns, dns prefetch, hide dns prefetch

disable-dns-prefetch/disable-dns-prefetch.php Passed 13 tests

The main PHP file in "Disable DNS prefetch" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Remove the DNS-Prefetch from header in front side.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1265

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin