78% open-external-links-in-new-window

Code Review | Open External Links In New Windows

WordPress plugin Open External Links In New Windows scored78%from 54 tests.

About plugin

  • Plugin page: open-external-lin...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2015
  • Latest release: Oct 14, 2015
  • Number of updates: 8
  • Update frequency: every 25.5 days
  • Top authors: Keef (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /4,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

An overview of server-side resources used by Open External Links In New Windows
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.00 ▼7.00
Dashboard /wp-admin3.31 ▼0.0444.59 ▼18.57
Posts /wp-admin/edit.php3.36 ▲0.0046.32 ▼0.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.87 ▲1.83
Media Library /wp-admin/upload.php3.23 ▲0.0035.06 ▼2.45
Open External Links In New Windows /wp-admin/options-general.php?page=open-external-links-in-new-windows3.2227.84

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Open External Links In New Windows
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.47 ▲0.072.31 ▲0.5643.88 ▼2.87
Dashboard /wp-admin2,210 ▲224.87 ▼0.0296.55 ▼17.3936.88 ▼6.28
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0539.27 ▲3.3835.46 ▼0.64
Add New Post /wp-admin/post-new.php1,536 ▲1223.38 ▲0.26590.73 ▼96.1570.14 ▲20.27
Media Library /wp-admin/upload.php1,392 ▲14.29 ▲0.0591.60 ▼8.4340.18 ▼4.58
Open External Links In New Windows /wp-admin/options-general.php?page=open-external-links-in-new-windows7982.0225.1831.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/open-external-links-in-new-window/oelinw_options.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-external-links-in-new-window/open-external-links-in-new-windows.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: external urls, external websites, open in new window, external links

open-external-links-in-new-window/open-external-links-in-new-windows.php 92% from 13 tests

Analyzing the main PHP file in "Open External Links In New Windows" version 1.0.0
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("open-external-links-in-new-window.php" instead of "open-external-links-in-new-windows.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin27 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP231026
JavaScript1101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin