78% broken-link-checker

Code Review | Broken Link Checker

WordPress plugin Broken Link Checker scored78%from 54 tests.

About plugin

  • Plugin page: broken-link-checker
  • Plugin version: 2.2.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 8, 2007
  • Latest release: Oct 26, 2023
  • Number of updates: 1,098
  • Update frequency: every 5.3 days
  • Top authors: whiteshadow (94.81%)panoslyrakis (2.09%)freediver (1.64%)

Code review

54 tests

User reviews

535 reviews

Install metrics

700,000+ active /16,454,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.39MB] [CPU: ▲17.88ms] Passed 4 tests

Server-side resources used by Broken Link Checker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.35 ▲2.8858.08 ▲18.65
Dashboard /wp-admin6.87 ▲3.5764.99 ▲14.89
Posts /wp-admin/edit.php6.92 ▲3.5664.52 ▲20.16
Add New Post /wp-admin/post-new.php9.42 ▲3.54103.40 ▲17.82
Media Library /wp-admin/upload.php6.80 ▲3.5759.93 ▲28.94
Cloud [new] /wp-admin/admin.php?page=blc_dash6.8256.69
Local [old] /wp-admin/admin.php?page=blc_local7.0773.73

Server storage [IO: ▲5.47MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 313 new files
Database: 4 new tables, 9 new options
New tables
wp_blc_synch
wp_blc_links
wp_blc_filters
wp_blc_instances
New WordPress options
blc_installation_log
theysaidso_admin_options
widget_recent-posts
db_upgraded
wsblc_options
widget_recent-comments
widget_theysaidso_widget
blc_activation_enabled
can_compress_scripts

Browser metrics Passed 4 tests

Broken Link Checker: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲18014.74 ▲0.381.76 ▼0.0442.28 ▼1.73
Dashboard /wp-admin2,348 ▲1685.81 ▲0.1690.91 ▼5.7945.09 ▲2.47
Posts /wp-admin/edit.php2,201 ▲1012.03 ▲0.0235.67 ▼0.1338.02 ▲3.18
Add New Post /wp-admin/post-new.php1,558 ▲2723.12 ▲0.09679.56 ▲20.5051.76 ▼3.17
Media Library /wp-admin/upload.php1,501 ▲984.26 ▲0.1696.15 ▼4.7543.32 ▲1.24
Cloud [new] /wp-admin/admin.php?page=blc_dash1,1453.6769.7284.53
Local [old] /wp-admin/admin.php?page=blc_local1,4483.7172.1771.24

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 0% 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
Please take a closer look at the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/broken-link-checker/app/emails/recipient-activation/templates/email-body-markup.php
    • > /wp-content/plugins/broken-link-checker/app/emails/scan-report/templates/email-body-markup.php
    • > /wp-content/plugins/broken-link-checker/app/emails/recipient-activation/templates/index.php
    • > /wp-content/plugins/broken-link-checker/app/emails/scan-report/templates/index.php
  • 52× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'BLC_DIRECTORY_LEGACY/includes/screen-options/screen-options.php' (include_path='.:/usr/share/php') in wp-content/plugins/broken-link-checker/legacy/core/core.php on line 23
    • > PHP Fatal error
      require_once(): Failed opening required 'BLC_DIRECTORY_LEGACY/includes/token-bucket.php' (include_path='.:/usr/share/php') in wp-content/plugins/broken-link-checker/legacy/modules/checkers/http.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'blcParser' not found in wp-content/plugins/broken-link-checker/legacy/modules/extras/embed-parser-base.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WPMUDEV_BLC\\Core\\Utils\\Abstracts\\Base' not found in wp-content/plugins/broken-link-checker/app/broken-links-actions/processors/class-main.php:28
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/broken-link-checker/legacy/includes/admin/search-form.php on line 2
    • > PHP Warning
      Use of undefined constant BLC_DIRECTORY_LEGACY - assumed 'BLC_DIRECTORY_LEGACY' (this will throw an Error in a future version of PHP) in wp-content/plugins/broken-link-checker/legacy/includes/utility-class.php on line 27
    • > PHP Warning
      include(BLC_DIRECTORY_LEGACY/idn/idna_convert.class.php): failed to open stream: No such file or directory in wp-content/plugins/broken-link-checker/legacy/includes/utility-class.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'blcContainer' not found in wp-content/plugins/broken-link-checker/legacy/modules/containers/comment.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPMUDEV_BLC\\App\\Options\\Settings\\Model' not found in wp-content/plugins/broken-link-checker/legacy/init.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'blcParser' not found in wp-content/plugins/broken-link-checker/legacy/modules/extras/embed-parser-base.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

broken-link-checker/broken-link-checker.php Passed 13 tests

The entry point to "Broken Link Checker" version 2.2.3 is a PHP file that has certain tags in its header comment area
85 characters long description:
Checks your blog for broken links and notifies you on the dashboard if any are found.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin52,113 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PO File309,99314,39225,299
PHP1585,38112,11024,696
JavaScript281842271,058
CSS1016630560
XML2820246
SVG100190
JSON10062
Sass1112

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.74
▷ Minimum class complexity1.00
▷ Maximum class complexity412.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces50
Interfaces2
Traits6
Classes144
▷ Abstract classes117.64%
▷ Concrete classes13392.36%
▷ Final classes43.01%
Methods1,150
▷ Static methods16114.00%
▷ Public methods1,00887.65%
▷ Protected methods726.26%
▷ Private methods706.09%
Functions64
▷ Named functions3351.56%
▷ Anonymous functions3148.44%
Constants32
▷ Global constants3196.88%
▷ Class constants13.12%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
41 PNG files occupy 0.23MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
legacy/images/googlevideo-embed.png3.47KB1.04KB▼ 70.14%
assets/images/footer-slogan.png8.38KB3.32KB▼ 60.43%
assets/images/close-icon.png0.28KB0.21KB▼ 24.74%
assets/images/blc-logo-white-28x28.png0.66KB0.54KB▼ 18.49%
assets/images/dummy-avatar.png0.60KB0.40KB▼ 33.33%