84% hash-link-scroll-offset

Code Review | Hash Link Scroll Offset

WordPress plugin Hash Link Scroll Offset scored 84% from 54 tests.

About plugin

  • Plugin page: hash-link-scroll-...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 21, 2014
  • Latest release: Aug 23, 2023
  • Number of updates: 20
  • Update frequency: every 166.1 days
  • Top authors: jtsternberg (50%)tw2113 (50%)webdevstudios (10%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active / 12,760 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.37ms] Passed 4 tests

This is a short check of server-side resources used by Hash Link Scroll Offset
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.31 ▼4.82
Dashboard /wp-admin3.34 ▲0.0351.62 ▼0.87
Posts /wp-admin/edit.php3.39 ▲0.0354.55 ▲3.76
Add New Post /wp-admin/post-new.php5.92 ▲0.03100.81 ▼2.01
Media Library /wp-admin/upload.php3.26 ▲0.0341.98 ▼1.79

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
hash_link_scroll_offset
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Hash Link Scroll Offset
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲12913.59 ▲0.308.54 ▲6.8039.14 ▲1.05
Dashboard /wp-admin2,203 ▼04.84 ▼0.95113.81 ▲14.9940.06 ▲0.55
Posts /wp-admin/edit.php2,092 ▼01.96 ▼0.0939.15 ▼1.2140.08 ▲4.77
Add New Post /wp-admin/post-new.php1,533 ▼923.40 ▲0.20689.65 ▲24.8460.78 ▲7.81
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0194.00 ▼16.8940.94 ▼6.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • hash_link_scroll_offset
    • db_upgraded
    • theysaidso_admin_options
    • 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 | 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/hash-link-scroll-offset/hash-link-scroll-offset.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please add at least on tag
Please take inspiration from this readme.txt

hash-link-scroll-offset/hash-link-scroll-offset.php 92% from 13 tests

Analyzing the main PHP file in "Hash Link Scroll Offset" version 0.2.1
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Good job! No executable or dangerous file extensions detected360 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript48249245
PHP12310993
JSON10022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected