78% broken-link-repair

Code Review | Broken Links Repair By Hexometer

WordPress plugin Broken Links Repair By Hexometer scored78%from 54 tests.

About plugin

  • Plugin page: broken-link-repair
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.5.35+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Jan 15, 2020
  • Number of updates: 22
  • Update frequency: every 1.3 days
  • Top authors: hexact (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /6,641 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.58ms] Passed 4 tests

This is a short check of server-side resources used by Broken Links Repair By Hexometer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.82 ▼6.45
Dashboard /wp-admin3.37 ▲0.0747.09 ▼3.65
Posts /wp-admin/edit.php3.49 ▲0.1342.79 ▼7.01
Add New Post /wp-admin/post-new.php5.97 ▲0.0984.13 ▼13.19
Media Library /wp-admin/upload.php3.30 ▲0.0735.14 ▲2.20

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 6 new options
New tables
wp_hexometer_broken_links
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Broken Links Repair By Hexometer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9413.69 ▼0.691.91 ▼1.5546.28 ▲3.48
Dashboard /wp-admin2,232 ▲504.89 ▼0.02111.24 ▲7.1839.49 ▼11.08
Posts /wp-admin/edit.php2,115 ▲262.06 ▲0.0537.53 ▼1.2533.31 ▼4.17
Add New Post /wp-admin/post-new.php1,538 ▼023.50 ▲0.38671.90 ▲10.8458.74 ▲6.43
Media Library /wp-admin/upload.php1,414 ▲264.29 ▲0.1397.93 ▼0.9042.72 ▼3.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/broken-link-repair/views/layout/footer.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/broken-link-repair/inc/LinksTable.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/screen.php): failed to open stream: No such file or directory in wp-content/plugins/broken-link-repair/inc/LinksTable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Hexometer\\plugin_dir_path() in wp-content/plugins/broken-link-repair/index.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Hexometer\\plugin_dir_path() in wp-content/plugins/broken-link-repair/hooks/ingest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/broken-link-repair/views/LinksTableContent.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/broken-link-repair/inc/LinksTable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Hexometer\\plugin_dir_path() in wp-content/plugins/broken-link-repair/hooks/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Hexometer\\plugin_dir_path() in wp-content/plugins/broken-link-repair/hooks/content.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/broken-link-repair/views/layout/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/broken-link-repair/views/LoginForm.php:2

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: hexometer, repair broken links, disable bad links, fix 404 links

broken-link-repair/index.php 85% from 13 tests

"Broken Links Repair By Hexometer" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("broken-link-repair.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 169 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected660 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP107318360
JavaScript2269148
SVG10195
CSS17057

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.50
▷ Minimum class complexity7.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods16.67%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin