73% vp-scroll-to-top

Code Review | VP Scroll to Top

WordPress plugin VP Scroll to Top scored73%from 54 tests.

About plugin

  • Plugin page: vp-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: May 12, 2014
  • Latest release: May 13, 2014
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: virtualproducts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,061 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.59ms] Passed 4 tests

This is a short check of server-side resources used by VP Scroll to Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.87 ▼36.07
Dashboard /wp-admin2.07 ▼1.247.00 ▼40.83
Posts /wp-admin/edit.php2.07 ▼1.295.80 ▼42.03
Add New Post /wp-admin/post-new.php2.07 ▼3.825.81 ▼91.42
Media Library /wp-admin/upload.php2.07 ▼1.164.82 ▼29.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for VP Scroll to Top
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20513.78 ▼0.606.41 ▲4.5745.27 ▼4.04
Dashboard /wp-admin2,221 ▲365.91 ▲0.03101.09 ▼9.6838.81 ▼0.88
Posts /wp-admin/edit.php2,104 ▲152.08 ▲0.1038.38 ▼1.9335.56 ▼3.06
Add New Post /wp-admin/post-new.php1,524 ▼1823.15 ▲5.14649.30 ▼19.5936.16 ▼15.83
Media Library /wp-admin/upload.php1,400 ▲124.26 ▲0.0498.38 ▲0.3141.03 ▼3.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the vp_jquary_easing handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vp-scroll-to-top/vp-scroll-to-top.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #0 is required in vp-scroll-to-top/assets to your readme.txt
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

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

The main file in "VP Scroll to Top" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

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
Success! There were no dangerous files found in this plugin168 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3780150
PHP1121011
CSS1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/top.png1.71KB0.69KB▼ 59.35%