90% wpfront-scroll-top

Code Review | WPFront Scroll Top

WordPress plugin WPFront Scroll Top scored90%from 54 tests.

About plugin

  • Plugin page: wpfront-scroll-top
  • Plugin version: 2.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2014
  • Latest release: Oct 8, 2023
  • Number of updates: 112
  • Update frequency: every 31.9 days
  • Top authors: syammohanm (100%)

Code review

54 tests

User reviews

133 reviews

Install metrics

200,000+ active /1,389,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.25ms] Passed 4 tests

A check of server-side resources used by WPFront Scroll Top
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2835.31 ▼3.11
Dashboard /wp-admin3.63 ▲0.2845.73 ▼11.36
Posts /wp-admin/edit.php3.68 ▲0.3246.52 ▲1.09
Add New Post /wp-admin/post-new.php6.14 ▲0.2690.84 ▼3.60
Media Library /wp-admin/upload.php3.49 ▲0.2635.19 ▲1.27
Scroll Top /wp-admin/options-general.php?page=wpfront-scroll-top3.5035.90

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WPFront Scroll Top
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.32 ▼0.051.60 ▼0.1339.92 ▼2.89
Dashboard /wp-admin2,199 ▲195.63 ▼0.0392.18 ▲4.0241.78 ▲2.48
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0239.57 ▲3.5936.70 ▼1.24
Add New Post /wp-admin/post-new.php1,529 ▲123.65 ▲0.46678.07 ▲42.5853.86 ▲7.42
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.1792.79 ▼5.7144.39 ▲0.22
Scroll Top /wp-admin/options-general.php?page=wpfront-scroll-top2,4799.77155.6741.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: back to top, scroll up, wordpress scroll top, scroll to top, scroll top

wpfront-scroll-top/wpfront-scroll-top.php Passed 13 tests

The principal PHP file in "WPFront Scroll Top" v. 2.2 is loaded by WordPress automatically on each request
64 characters long description:
Allows the visitor to easily scroll back to the top of the page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin2,214 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP82958721,045
HTML1040371
JavaScript66024334
PO File17687173
LESS7380146
CSS520145

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity25.40
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods80
▷ Static methods11.25%
▷ Public methods3543.75%
▷ Protected methods4455.00%
▷ Private methods11.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
74 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/110.png3.02KB3.06KB0.00%
images/icons/46.png3.45KB3.55KB0.00%
images/icons/106.png1.48KB1.53KB0.00%
images/icons/95.png1.61KB1.54KB▼ 4.48%
images/icons/7.png3.26KB3.30KB0.00%