90% open-in-new-window-plugin

Code Review | Open in New Window Plugin

WordPress plugin Open in New Window Plugin scored90%from 54 tests.

About plugin

  • Plugin page: open-in-new-windo...
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2009
  • Latest release: Oct 27, 2022
  • Number of updates: 31
  • Update frequency: every 152.3 days
  • Top authors: kpgraham (87.1%)willjenkins (16.13%)

Code review

54 tests

User reviews

16 reviews

Install metrics

4,000+ active /112,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.65ms] Passed 4 tests

A check of server-side resources used by Open in New Window Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.31 ▼9.05
Dashboard /wp-admin3.31 ▲0.0142.80 ▼3.72
Posts /wp-admin/edit.php3.36 ▲0.0145.49 ▲0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.44 ▼7.74
Media Library /wp-admin/upload.php3.24 ▲0.0133.70 ▼2.07
Open in new window /wp-admin/options-general.php?page=openinnewwindow3.2225.67

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Open in New Window Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.58 ▼0.792.94 ▲1.2438.24 ▼11.85
Dashboard /wp-admin2,210 ▲194.88 ▼0.02110.45 ▼4.6943.32 ▼5.79
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0136.56 ▼1.8331.61 ▼3.62
Add New Post /wp-admin/post-new.php1,538 ▼423.43 ▲5.24671.71 ▲55.2452.78 ▼0.51
Media Library /wp-admin/upload.php1,392 ▲104.21 ▼0.0593.23 ▼5.5743.47 ▲0.09
Open in new window /wp-admin/options-general.php?page=openinnewwindow9952.0229.3834.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: new window, outbound, open, links

open-in-new-window-plugin/open_in_new_window.php 92% from 13 tests

The main PHP script in "Open in New Window Plugin" version 2.8 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("open-in-new-window-plugin.php" instead of "open_in_new_window.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
There were no executable files found in this plugin232 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22617158
JavaScript333674

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions6
▷ Named functions6100.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
No PNG images were found in this plugin