83% tid-scroll-to-top

Code Review | TID Scroll to Top

WordPress plugin TID Scroll to Top scored83%from 54 tests.

About plugin

  • Plugin page: tid-scroll-to-top
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2023
  • Latest release: Feb 26, 2023
  • Number of updates: 9
  • Update frequency: every 1.2 days
  • Top authors: techitdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /242 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.84ms] Passed 4 tests

This is a short check of server-side resources used by TID Scroll to Top
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.83 ▼6.21
Dashboard /wp-admin3.33 ▼0.0249.46 ▼13.00
Posts /wp-admin/edit.php3.38 ▲0.0250.82 ▲2.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.58 ▼27.89
Media Library /wp-admin/upload.php3.25 ▲0.0238.21 ▼0.27

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TID Scroll to Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16413.82 ▼0.7110.35 ▲8.3044.74 ▲0.32
Dashboard /wp-admin2,213 ▲365.55 ▼0.1286.35 ▼14.2041.16 ▼1.84
Posts /wp-admin/edit.php2,121 ▲182.02 ▲0.0138.52 ▲1.5334.53 ▼0.05
Add New Post /wp-admin/post-new.php1,555 ▲2723.03 ▲0.12619.58 ▼88.4355.24 ▼10.75
Media Library /wp-admin/upload.php1,418 ▲274.20 ▲0.0295.53 ▼8.6141.53 ▼7.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tid-scroll-to-top/tid-scroll-to-top.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

tid-scroll-to-top/tid-scroll-to-top.php 85% from 13 tests

The main file in "TID Scroll to Top" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.9" instead of "5.2")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin204 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13856128
CSS24175
JavaScript1061

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/author.png140.61KB58.63KB▼ 58.31%
img/top.png1.11KB0.19KB▼ 82.70%
img/bmc.png6.06KB5.97KB▼ 1.40%