84% open-external-links-in-a-new-window

Code Review | External Links in New Window / New Tab

WordPress plugin External Links in New Window / New Tab scored84%from 54 tests.

About plugin

  • Plugin page: open-external-lin...
  • Plugin version: 1.44
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2010
  • Latest release: Aug 10, 2023
  • Number of updates: 67
  • Update frequency: every 70.2 days
  • Top authors: kezze (59.7%)WebFactory (41.79%)

Code review

54 tests

User reviews

71 reviews

Install metrics

40,000+ active /421,131 total downloads


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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.52ms] Passed 4 tests

Analyzing server-side resources used by External Links in New Window / New Tab
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.08 ▼4.39
Dashboard /wp-admin3.38 ▲0.0843.14 ▼8.38
Posts /wp-admin/edit.php3.44 ▲0.0847.04 ▲3.42
Add New Post /wp-admin/post-new.php5.96 ▲0.0890.82 ▼4.52
Media Library /wp-admin/upload.php3.31 ▲0.0833.91 ▼0.79
External Links /wp-admin/options-general.php?page=external_links_in_new_windows3.2930.73

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for External Links in New Window / New Tab
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.36 ▲0.012.96 ▲1.2840.27 ▼2.85
Dashboard /wp-admin2,199 ▲255.63 ▼0.0291.33 ▼4.2241.11 ▼5.47
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0339.32 ▲3.4636.45 ▼0.67
Add New Post /wp-admin/post-new.php1,529 ▲323.86 ▲0.82651.38 ▼3.9752.08 ▼12.21
Media Library /wp-admin/upload.php1,404 ▲74.21 ▼0.0198.23 ▼1.1839.47 ▼2.73
External Links /wp-admin/options-general.php?page=external_links_in_new_windows8892.0123.5637.96

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/open-external-links-in-a-new-window/open-external-links-in-a-new-window.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: external links, target new, blank window, links, tabs...

open-external-links-in-a-new-window/open-external-links-in-a-new-window.php Passed 13 tests

"External Links in New Window / New Tab" version 1.44's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
99 characters long description:
Opens all external links in a new window. XHTML Strict compliant and search engine optimized (SEO).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected720 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions777.78%
▷ Anonymous functions222.22%
▷ 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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wf-flyout/icons/ucp.png16.30KB2.35KB▼ 85.58%
wf-flyout/icons/wp-reset.png3.11KB2.28KB▼ 26.85%
wf-flyout/icons/external.png2.79KB1.63KB▼ 41.59%