83% external-links-nofollow-open-in-new-tab-favicon

Code Review | External & Affiliate Links Processor

WordPress plugin External & Affiliate Links Processor scored83%from 54 tests.

About plugin

  • Plugin page: external-links-no...
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Jul 6, 2017
  • Number of updates: 32
  • Update frequency: every 20.4 days
  • Top authors: reikiman (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /4,359 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼10.96ms] Passed 4 tests

A check of server-side resources used by External & Affiliate Links Processor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.50 ▼2.54
Dashboard /wp-admin3.46 ▲0.1144.30 ▼16.99
Posts /wp-admin/edit.php3.57 ▲0.2145.25 ▼0.39
Add New Post /wp-admin/post-new.php6.07 ▲0.1885.25 ▼23.90
Media Library /wp-admin/upload.php3.38 ▲0.1531.85 ▲0.19
External & Affiliate Links Processor /wp-admin/options-general.php?page=dh_nf_option_page3.3535.52

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for External & Affiliate Links Processor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.47 ▼0.091.66 ▲0.0237.13 ▼5.30
Dashboard /wp-admin2,213 ▲225.89 ▲0.9796.60 ▼8.4440.13 ▲2.71
Posts /wp-admin/edit.php2,099 ▲132.05 ▼0.0136.58 ▼3.5636.86 ▼2.00
Add New Post /wp-admin/post-new.php1,525 ▼317.64 ▼0.63665.18 ▲58.0961.90 ▲4.53
Media Library /wp-admin/upload.php1,401 ▲224.19 ▼0.0196.16 ▼14.1841.85 ▼1.69
External & Affiliate Links Processor /wp-admin/options-general.php?page=dh_nf_option_page1,3322.2241.7867.68

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 were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 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/external-links-nofollow-open-in-new-tab-favicon/admin.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/external-links-nofollow-open-in-new-tab-favicon/nofollow-external-link.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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 to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

external-links-nofollow-open-in-new-tab-favicon/nofollow-external-link.php 77% from 13 tests

The principal PHP file in "External & Affiliate Links Processor" v. 1.5.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("external-links-nofollow-open-in-new-tab-favicon.php" instead of "nofollow-external-link.php")
  • Plugin Name: Please shorten the plugin name (currently 90 characters long instead of max. 70)
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin866 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3172161853
CSS21110
JavaScript1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods330.00%
▷ Protected methods00.00%
▷ Private methods770.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/extlink.png0.19KB0.14KB▼ 29.08%