84% to-the-top-block

Code Review | SMNTCS To The Top Block

WordPress plugin SMNTCS To The Top Block scored84%from 54 tests.

About plugin

  • Plugin page: to-the-top-block
  • Plugin version: 1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 7, 2022
  • Latest release: Oct 21, 2023
  • Number of updates: 8
  • Update frequency: every 59.6 days
  • Top authors: nielslange (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.13ms] Passed 4 tests

An overview of server-side resources used by SMNTCS To The Top Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.63 ▲3.29
Dashboard /wp-admin3.32 ▼0.0348.67 ▼8.38
Posts /wp-admin/edit.php3.37 ▲0.0147.24 ▼2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.06 ▼21.40
Media Library /wp-admin/upload.php3.24 ▲0.0134.56 ▼0.50

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for SMNTCS To The Top Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.35 ▲0.001.67 ▲0.0844.04 ▲5.47
Dashboard /wp-admin2,198 ▲245.59 ▲0.0694.82 ▲5.6441.25 ▲1.66
Posts /wp-admin/edit.php2,097 ▼32.02 ▼0.0034.57 ▼1.0234.00 ▼4.48
Add New Post /wp-admin/post-new.php6,366 ▲4,83727.70 ▲4.50924.87 ▲322.4556.31 ▲8.76
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.0694.66 ▼8.0742.65 ▼1.62

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Please fix 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/to-the-top-block/to-the-top-block.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: scroll to top, scroll up, scroll to top block, back to top, scroll top

to-the-top-block/to-the-top-block.php 92% from 13 tests

"SMNTCS To The Top Block" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin32,229 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JSON40032,116
TypeScript3101560
Markdown121031
PHP222510
Sass2108
CSS2002
JavaScript2022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin