10% no-external-links

Code Review | WP No External Links

WordPress plugin WP No External Links scored 10% from 53 tests.

About plugin

  • Plugin page: no-external-links
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.0
  • WordPress version: 5.8.1
  • First release: Jan 29, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 6
  • Update frequency: every 52.3 days
  • Top authors: nicolly (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

7,000+ active / 17,827 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/no-external-links/no-external-links.php+131
    Undefined index: old_name

Server metrics [RAM: ▼0.23MB] [CPU: ▼264.86ms] Passed 4 tests

An overview of server-side resources used by WP No External Links
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.2542.43 ▲20.63
Dashboard /wp-admin3.17 ▲0.1147.73 ▲10.25
Posts /wp-admin/edit.php3.24 ▲0.1445.84 ▲2.11
Add New Post /wp-admin/post-new.php4.14 ▼1.2949.47 ▼1,063.64
Media Library /wp-admin/upload.php3.10 ▲0.1033.83 ▼8.14
No External Links  /wp-admin/options-general.php?page=no-external-links/no-external-links-options.php3.0730.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: 2 new tables, 1 new option
New tables
wp_nel_mask_links
wp_nel_links_stats
New WordPress options
no_external_links

Browser metrics Passed 4 tests

WP No External Links: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,655 ▲7315.76 ▲0.298.73 ▼0.7249.16 ▲5.17
Dashboard /wp-admin2,929 ▲735.90 ▲0.09146.18 ▲6.67144.80 ▲43.53
Posts /wp-admin/edit.php2,727 ▲212.68 ▼0.0169.05 ▲0.7498.31 ▲8.04
Add New Post /wp-admin/post-new.php1,693 ▲3618.99 ▲0.16414.23 ▲24.86120.37 ▲6.08
Media Library /wp-admin/upload.php1,719 ▼534.99 ▼0.04132.20 ▼28.78135.64 ▲17.12
No External Links  /wp-admin/options-general.php?page=no-external-links/no-external-links-options.php1,2332.0958.3583.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • no_external_links

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/no-external-links/no-external-links-custom-parser.sample.php
    • > /wp-content/plugins/no-external-links/no-external-links.php
    • > /wp-content/plugins/no-external-links/no-external-links-options.php
    • > /wp-content/plugins/no-external-links/no-external-links-parser.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Contributors: Contributors not specified
You can look at the official readme.txt

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

The principal PHP file in "WP No External Links" v. 1.0.2 is loaded by WordPress automatically on each request
41 characters long description:
Convert all external links into internal.

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
No dangerous file extensions were detected1,195 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP57769741
PO File2152304454

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity33.25
▷ Minimum class complexity4.00
▷ Maximum class complexity75.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
externallink.png0.17KB0.16KB▼ 4.65%