84% open-links-in-new-tab

Code Review | Open Links In New Tab

WordPress plugin Open Links In New Tab scored84%from 54 tests.

About plugin

  • Plugin page: open-links-in-new...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: May 26, 2021
  • Latest release: Nov 26, 2022
  • Number of updates: 16
  • Update frequency: every 34.4 days
  • Top authors: rezakhan995 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /5,967 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Open Links In New Tab
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.68 ▲5.79
Dashboard /wp-admin3.31 ▼0.0351.93 ▼16.99
Posts /wp-admin/edit.php3.36 ▲0.0150.32 ▲0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.67 ▼2.91
Media Library /wp-admin/upload.php3.24 ▲0.0138.08 ▲1.61
Links In New Tab /wp-admin/options-general.php?page=open_links_in_new_tab3.2032.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Open Links In New Tab
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.38 ▲0.033.05 ▲1.3746.02 ▲2.93
Dashboard /wp-admin2,187 ▲105.59 ▲0.0680.43 ▼25.8638.10 ▼7.43
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0334.71 ▼2.1636.31 ▲2.69
Add New Post /wp-admin/post-new.php1,540 ▲1418.19 ▼5.41638.79 ▼49.7478.78 ▲18.74
Media Library /wp-admin/upload.php1,404 ▲74.10 ▼0.12117.15 ▲10.8948.80 ▲2.80
Links In New Tab /wp-admin/options-general.php?page=open_links_in_new_tab8072.0225.4528.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
  • 2× 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-links-in-new-tab/core/bootstrap.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/open-links-in-new-tab/open-links-in-new-tab.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: target blank, new window, new tab, external links, open links

open-links-in-new-tab/open-links-in-new-tab.php Passed 13 tests

The main file in "Open Links In New Tab" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
90 characters long description:
Wordpress plugin that opens links in a new tab. Search engine optimization (SEO) friendly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected220 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP342153136
PO File2141484

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods1076.92%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
PNG images were not found in this plugin