84% scroll-to-top-by-towkir

Code Review | SCROLL TO TOP BY TOWKIR

WordPress plugin SCROLL TO TOP BY TOWKIR scored84%from 54 tests.

About plugin

  • Plugin page: scroll-to-top-by-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2021
  • Latest release: Nov 6, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: mastowkir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /267 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
Installer ran successfully

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

Server-side resources used by SCROLL TO TOP BY TOWKIR
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.44 ▼6.91
Dashboard /wp-admin3.31 ▼0.0344.77 ▼13.95
Posts /wp-admin/edit.php3.36 ▲0.0047.97 ▼10.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.73 ▼13.18
Media Library /wp-admin/upload.php3.23 ▲0.0036.44 ▲1.50

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SCROLL TO TOP BY TOWKIR
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.65 ▼0.945.85 ▲3.8736.97 ▼5.55
Dashboard /wp-admin2,206 ▲185.91 ▲1.01108.87 ▼9.3937.91 ▼5.18
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0241.01 ▼0.5836.34 ▼0.53
Add New Post /wp-admin/post-new.php1,533 ▲1123.12 ▲0.00640.69 ▼42.7651.91 ▲1.83
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0895.39 ▼12.0742.95 ▼8.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 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/scroll-to-top-by-towkir/scroll-to-top-by-towkir.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Once you have installed & activate the plugin. You Can See Scroll to top button in your website.)
Please take inspiration from this readme.txt

scroll-to-top-by-towkir/scroll-to-top-by-towkir.php 92% from 13 tests

The main PHP file in "SCROLL TO TOP BY TOWKIR" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • 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 a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected9,596 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
JavaScript13016
PHP181315
CSS21413

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin