83% ashch-scroll-top

Code Review | Ashch-scrollTop

WordPress plugin Ashch-scrollTop scored83%from 54 tests.

About plugin

  • Plugin page: ashch-scroll-top
  • Plugin version: 1.0.1
  • PHP compatiblity: 4.9.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 24, 2018
  • Latest release: Dec 26, 2018
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: andreyshchedrin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /852 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
This plugin's installer ran successfully

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

A check of server-side resources used by Ashch-scrollTop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.17 ▼3.67
Dashboard /wp-admin3.34 ▲0.0349.28 ▼0.13
Posts /wp-admin/edit.php3.39 ▲0.0348.85 ▼0.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.10 ▼12.86
Media Library /wp-admin/upload.php3.26 ▲0.0339.43 ▲3.98
Scroll Top Button /wp-admin/options-general.php?page=scrltop3.2334.34

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 16 new options
New WordPress options
scrltop_position_button
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
scrltop_enable_button
scrltop_button_color
widget_recent-comments
scrltop_start_scrolling
can_compress_scripts
scrltop_position_button_right
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ashch-scrollTop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.27 ▼0.322.82 ▲1.1046.87 ▲4.19
Dashboard /wp-admin2,199 ▲225.62 ▼0.0190.58 ▲1.8039.29 ▼4.17
Posts /wp-admin/edit.php2,101 ▲12.04 ▲0.0534.40 ▼3.5933.37 ▼2.04
Add New Post /wp-admin/post-new.php1,536 ▼923.17 ▲0.05658.01 ▲15.6456.79 ▲5.64
Media Library /wp-admin/upload.php1,404 ▲74.25 ▲0.0495.79 ▼9.1742.38 ▼2.07
Scroll Top Button /wp-admin/options-general.php?page=scrltop1,3282.3948.0741.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ashch-scroll-top/scrltop-styles.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ashch-scroll-top/scrltop.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ashch-scroll-top/scrltop-scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ashch-scroll-top/scrltop-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ashch-scroll-top/scrltop-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ashch-scroll-top/scrltop-core.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Scroll Top Plugin Activation)
Please take inspiration from this readme.txt

ashch-scroll-top/scrltop.php 85% from 13 tests

The primary PHP file in "Ashch-scrollTop" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ashch-scroll-top.php" instead of "scrltop.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin7,842 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG30124,482
CSS21,37882,898
PHP72932291
PO File248112134
JavaScript28237

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions11
▷ Named functions11100.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