68% mihdan-no-external-links

Code Review | No External Links

WordPress plugin No External Links scored68%from 54 tests.

About plugin

  • Plugin page: mihdan-no-externa...
  • Plugin version: 5.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.4-6.4
  • WordPress version: 6.3.1
  • First release: Jan 17, 2018
  • Latest release: Nov 25, 2023
  • Number of updates: 47
  • Update frequency: every 45.5 days
  • Top authors: mihdan (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

7,000+ active /48,602 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.13MB] [CPU: ▲13.30ms] Passed 4 tests

This is a short check of server-side resources used by No External Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.55 ▲1.0954.16 ▲12.49
Dashboard /wp-admin4.44 ▲1.1460.56 ▲11.38
Posts /wp-admin/edit.php4.60 ▲1.2559.55 ▲13.22
Add New Post /wp-admin/post-new.php7.05 ▲1.1698.65 ▲16.10
Media Library /wp-admin/upload.php4.36 ▲1.1358.25 ▲25.35
Masks /wp-admin/admin.php?page=mihdan-no-external-links-masks4.3245.35
Settings /wp-admin/admin.php?page=mihdan-no-external-links4.3748.11
Logs /wp-admin/admin.php?page=mihdan-no-external-links-logs4.3246.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 395 new files
Database: 2 new tables, 10 new options
New tables
wp_external_links_logs
wp_external_links_masks
New WordPress options
theysaidso_admin_options
mihdan_noexternallinks_version
recovery_mode_email_last_sent
can_compress_scripts
mihdan_noexternallinks_encryption_key
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
mihdan_noexternallinks_compatibility_check

Browser metrics Passed 4 tests

This is an overview of browser requirements for No External Links
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6314.22 ▼0.121.68 ▼0.0337.07 ▼6.06
Dashboard /wp-admin2,233 ▲555.67 ▼0.0592.89 ▼20.5442.80 ▼7.49
Posts /wp-admin/edit.php2,157 ▲572.30 ▲0.3439.88 ▲1.8130.50 ▼4.46
Add New Post /wp-admin/post-new.php6,281 ▲4,74625.95 ▲2.83949.31 ▲343.2240.03 ▼22.40
Media Library /wp-admin/upload.php1,447 ▲534.41 ▲0.2198.59 ▲2.0043.94 ▲2.73
Masks /wp-admin/admin.php?page=mihdan-no-external-links-masks7261.178.8618.73
Settings /wp-admin/admin.php?page=mihdan-no-external-links1,0821.8830.1846.07
Logs /wp-admin/admin.php?page=mihdan-no-external-links-logs7261.568.4917.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_external_links_masks
    • wp_external_links_logs
  • Zombie WordPress options detected upon uninstall: 10 options
    • mihdan_noexternallinks_version
    • mihdan_noexternallinks_encryption_key
    • can_compress_scripts
    • widget_recent-posts
    • mihdan_noexternallinks_compatibility_check
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mihdan-no-external-links-masks
    • > Error in wp-content/plugins/mihdan-no-external-links/admin/partials/masks.php+18
    Uncaught Error: Call to a member function prepare_items() on null in wp-content/plugins/mihdan-no-external-links/admin/partials/masks.php:18
    Stack trace:
    #0 wp-content/plugins/mihdan-no-external-links/admin/Admin.php(335): include_once()
    #1 wp-includes/class-wp-hook.php(310): Mihdan\No_External_Links\Admin\Admin->display_masks_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=mihdan-no-external-links-logs
    • > Error in wp-content/plugins/mihdan-no-external-links/admin/partials/logs.php+18
    Uncaught Error: Call to a member function prepare_items() on null in wp-content/plugins/mihdan-no-external-links/admin/partials/logs.php:18
    Stack trace:
    #0 wp-content/plugins/mihdan-no-external-links/admin/Admin.php(344): include_once()
    #1 wp-includes/class-wp-hook.php(310): Mihdan\No_External_Links\Admin\Admin->display_log_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

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
  • 168× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\TwistedEdwards' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Ed448.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Math\\BigInteger\\Engines\\PHP\\Base' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/PowerOfTwo.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\Formats\\Keys\\PuTTY' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\DH' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Parameters.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/mihdan-no-external-links/admin/partials/masks.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\DSA' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v2.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\StreamCipher' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\AsymmetricKey' not found in wp-content/plugins/mihdan-no-external-links/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC.php:54

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

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

The main PHP file in "No External Links" ver. 5.1.0 adds more information about the plugin and also serves as the entry point for this plugin
117 characters long description:
Convert external links into internal links, site wide or post/page specific. Add NoFollow, Click logging, and more...

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin37,747 lines of code in 379 files:
LanguageFilesBlank linesComment linesLines of code
PHP3677,40923,55737,230
JSON100313
JavaScript32610112
CSS36046
XML10019
Bourne Shell25014
Markdown13012
YAML1101

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity670.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces42
Interfaces2
Traits4
Classes343
▷ Abstract classes19857.73%
▷ Concrete classes14542.27%
▷ Final classes2517.24%
Methods1,515
▷ Static methods41827.59%
▷ Public methods1,08571.62%
▷ Protected methods19612.94%
▷ Private methods23415.45%
Functions93
▷ Named functions6974.19%
▷ Anonymous functions2425.81%
Constants358
▷ Global constants4713.13%
▷ Class constants31186.87%
▷ Public constants311100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin