83% scroll-to-anywhere

Code Review | Scroll To AnyWhere

WordPress plugin Scroll To AnyWhere scored83%from 54 tests.

About plugin

  • Plugin page: scroll-to-anywhere
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Nov 18, 2018
  • Number of updates: 24
  • Update frequency: every 49.2 days
  • Top authors: samiullah-kaifi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,546 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
Install script ran successfully

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

A check of server-side resources used by Scroll To AnyWhere
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.95 ▼3.71
Dashboard /wp-admin3.31 ▲0.0147.48 ▼1.54
Posts /wp-admin/edit.php3.36 ▲0.0146.53 ▼0.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.26 ▼1.10
Media Library /wp-admin/upload.php3.23 ▲0.0032.73 ▼1.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scroll To AnyWhere
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.63 ▼0.758.54 ▲6.8238.19 ▼9.09
Dashboard /wp-admin2,219 ▲315.83 ▲0.7398.23 ▼21.9342.50 ▼5.22
Posts /wp-admin/edit.php2,105 ▲162.03 ▲0.0041.75 ▲6.0735.35 ▲1.30
Add New Post /wp-admin/post-new.php1,555 ▲3118.14 ▼5.09627.15 ▼30.5655.93 ▼7.57
Media Library /wp-admin/upload.php1,407 ▲254.28 ▲0.1296.97 ▼0.9042.70 ▲1.12

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/scroll-to-anywhere/tag/scfront.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/scroll-to-anywhere/tag/scback.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/scroll-to-anywhere/scback.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/scroll-to-anywhere/scfront.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Settings Page of the plugin.), #2 (Front View of scroll.)
  • Requires at least: Invalid plugin version format
  • Plugin Name: You should set the name of your plugin on the first line ( === scroll-to-anywhere === )
The official readme.txt is a good inspiration

scroll-to-anywhere/scback.php 85% from 13 tests

The principal PHP file in "Scroll To AnyWhere" v. 1.0.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 236 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("scroll-to-anywhere.php" instead of "scback.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,142 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113938833
PHP27314273
CSS13036

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.27
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
9 PNG files occupy 0.28MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tag/screenshot-1.png69.17KB21.83KB▼ 68.44%
tag/screenshot-2.png61.04KB17.54KB▼ 71.26%
tag/js/hs.png2.62KB7.54KB0.00%
js/hs.png2.62KB7.54KB0.00%
js/hv.png2.80KB7.32KB0.00%