84% wp-external-links

Code Review | External Links - nofollow, noopener & new window

WordPress plugin External Links - nofollow, noopener & new window scored84%from 54 tests.

About plugin

  • Plugin page: wp-external-links
  • Plugin version: 2.59
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Feb 27, 2011
  • Latest release: Oct 25, 2023
  • Number of updates: 152
  • Update frequency: every 30.4 days
  • Top authors: freelancephp (58.55%)WebFactory (40.79%)talextech (1.97%)

Code review

54 tests

User reviews

235 reviews

Install metrics

100,000+ active /1,231,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼2.76ms] Passed 4 tests

A check of server-side resources used by External Links - nofollow, noopener & new window
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3343.94 ▲7.43
Dashboard /wp-admin3.72 ▲0.3854.69 ▼4.05
Posts /wp-admin/edit.php3.77 ▲0.4248.40 ▼1.92
Add New Post /wp-admin/post-new.php6.32 ▲0.4383.31 ▼12.50
Media Library /wp-admin/upload.php3.64 ▲0.4241.84 ▲7.81

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 206 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
wpel-excluded-link-settings
widget_theysaidso_widget
wpel-exceptions-settings
can_compress_scripts
wpel-first-install
wpel-version
wpel-external-link-settings
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for External Links - nofollow, noopener & new window
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9414.42 ▲0.241.81 ▲0.2043.25 ▲3.20
Dashboard /wp-admin2,249 ▲785.72 ▲0.1892.86 ▲3.6566.20 ▲19.09
Posts /wp-admin/edit.php2,166 ▲662.29 ▲0.3241.33 ▲4.3035.71 ▼0.89
Add New Post /wp-admin/post-new.php1,552 ▲2623.20 ▲0.21672.49 ▼30.79177.31 ▲113.14
Media Library /wp-admin/upload.php1,463 ▲664.39 ▲0.24118.85 ▲19.5868.71 ▲20.86

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpel-first-install
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 55× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-external-links/templates/network-page/main.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-external-links/templates/partials/tab-contents/link-checking.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WPRun_Base_1x0x0' not found in wp-content/plugins/wp-external-links/libs/fwp/class-fwp-debug.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPEL_Plugin' not found in wp-content/plugins/wp-external-links/templates/settings-page/tab-contents/external-links.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-external-links/templates/partials/tab-contents/fields-default.php on line 17
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/wp-external-links/templates/partials/tab-contents/fields-default.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'FWP_Settings_Section_Base_1x0x0' not found in wp-content/plugins/wp-external-links/includes/admin/settings-fields/class-wpel-admin-fields.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FWP_Plugin_Base_1x0x0' not found in wp-content/plugins/wp-external-links/includes/class-wpel-plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'FWP_Settings_Section_Base_1x0x0' not found in wp-content/plugins/wp-external-links/includes/admin/network-fields/class-wpel-network-admin-fields.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-external-links/templates/network-page/help-tabs/under-construction.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-external-links/wp-external-links.php Passed 13 tests

"External Links - nofollow, noopener & new window" version 2.59's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
107 characters long description:
Open external links in a new tab or window, control "nofollow" and "noopener", set font icon; SEO friendly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected14,841 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
SVG20008,605
PHP548771,5973,738
CSS6160852,183
JavaScript35535313
JSON2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.21
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes33
▷ Abstract classes618.18%
▷ Concrete classes2781.82%
▷ Final classes1970.37%
Methods234
▷ Static methods145.98%
▷ Public methods7130.34%
▷ Protected methods15264.96%
▷ Private methods114.70%
Functions11
▷ Named functions218.18%
▷ Anonymous functions981.82%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 PNG files occupy 0.48MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/logo.png17.56KB2.52KB▼ 85.64%
public/images/link-checker.png138.74KB40.72KB▼ 70.65%
public/images/wpel-icons/icon-15.png1.16KB0.31KB▼ 73.36%
public/images/wpel-icons/icon-5.png0.21KB0.16KB▼ 25.00%
public/images/wpel-icons/icon-7.png0.17KB0.12KB▼ 30.46%