62% scroll-to-top-builder

Code Review | Scroll Top - WordPress Scroll to Top plugin

WordPress plugin Scroll Top - WordPress Scroll to Top plugin scored62%from 54 tests.

About plugin

  • Plugin page: scroll-to-top-bui...
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.6
  • WordPress version: 6.3.1
  • First release: Oct 22, 2018
  • Latest release: Jan 1, 2021
  • Number of updates: 94
  • Update frequency: every 8.5 days
  • Top authors: adamskaat (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,583 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.18MB] [CPU: ▼42.58ms] Passed 4 tests

Analyzing server-side resources used by Scroll Top - WordPress Scroll to Top plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6714.41 ▼25.63
Dashboard /wp-admin2.84 ▼0.5015.09 ▼47.23
Posts /wp-admin/edit.php2.85 ▼0.5115.72 ▼32.78
Add New Post /wp-admin/post-new.php2.85 ▼3.0417.17 ▼64.69
Media Library /wp-admin/upload.php2.85 ▼0.3813.75 ▼19.70
More Ideas? /wp-admin/edit.php?post_type=ystpscroll&page=ystp-ideas-page3.1325.26
Add New /wp-admin/post-new.php?post_type=ystpscroll3.3034.98
Support /wp-admin/edit.php?post_type=ystpscroll&page=ystp-support-page3.1324.15
All Items /wp-admin/edit.php?post_type=ystpscroll3.2629.63
More Plugins /wp-admin/edit.php?post_type=ystpscroll&page=ystp-more-plugins-page3.2531.34
Scroll Types /wp-admin/edit.php?post_type=ystpscroll&page=ystpscroll3.2526.64

Server storage [IO: ▲1.15MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 157 new files
Database: no new tables, 11 new options
New WordPress options
ystp_redirect
theysaidso_admin_options
db_upgraded
YstpShowNextTime
widget_recent-posts
can_compress_scripts
YstpInstallDate
widget_recent-comments
YstpInserted
YstpUsageDays
...

Browser metrics Passed 4 tests

An overview of browser requirements for Scroll Top - WordPress Scroll to Top plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,112 ▲35114.97 ▲0.7510.00 ▲8.3144.95 ▼0.29
Dashboard /wp-admin2,403 ▲2236.21 ▲0.54117.94 ▲17.2942.99 ▲2.50
Posts /wp-admin/edit.php2,327 ▲2273.53 ▲1.5154.14 ▲16.4035.09 ▼5.23
Add New Post /wp-admin/post-new.php1,565 ▲3723.43 ▼0.11572.19 ▼24.5833.78 ▼13.50
Media Library /wp-admin/upload.php1,469 ▲694.11 ▼0.0582.41 ▼11.5145.09 ▲3.38
More Ideas? /wp-admin/edit.php?post_type=ystpscroll&page=ystp-ideas-page1,0213.0239.3629.78
Add New /wp-admin/post-new.php?post_type=ystpscroll4,0696.70190.1592.89
Support /wp-admin/edit.php?post_type=ystpscroll&page=ystp-support-page1,0223.0137.2921.81
All Items /wp-admin/edit.php?post_type=ystpscroll1,8785.7998.3029.83
More Plugins /wp-admin/edit.php?post_type=ystpscroll&page=ystp-more-plugins-page1,1963.1241.0925.18
Scroll Types /wp-admin/edit.php?post_type=ystpscroll&page=ystpscroll1,0893.1539.2626.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/scroll-to-top-builder/classes/RegisterPostType.php+48
    Undefined index: post_type
  • The uninstall procedure has failed, leaving 10 options in the database
    • can_compress_scripts
    • db_upgraded
    • YstpInserted
    • widget_recent-comments
    • YstpUsageDays
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • YstpInstallDate
    • YstpShowNextTime

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ystpscroll&page=ystpscroll
    • > Notice in wp-content/plugins/scroll-to-top-builder/assets/js/Js.php+26
    Undefined index: post
    • > GET request to /wp-admin/post-new.php?post_type=ystpscroll
    • > Notice in wp-content/plugins/scroll-to-top-builder/assets/views/hiddenOptions.php+5
    Undefined index: ystp_type
    • > GET request to /wp-admin/edit.php?post_type=ystpscroll
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/scroll-to-top-builder/classes/RegisterPostType.php+48
    Undefined index: post_type

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/scroll-to-top-builder/assets/views/admin/support.php
  • 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/scroll-to-top-builder/config/config.php:12
    • > PHP Warning
      Use of undefined constant YSTP_FILE_NAME - assumed 'YSTP_FILE_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-to-top-builder/config/config.php on line 11
    • > PHP Warning
      Use of undefined constant YSTP_SUPPORT_URL - assumed 'YSTP_SUPPORT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-to-top-builder/assets/views/admin/support.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ystp\\add_action() in wp-content/plugins/scroll-to-top-builder/assets/css/Css.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function getOptionValue() on null in wp-content/plugins/scroll-to-top-builder/assets/views/hiddenOptions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ystp\\__() in wp-content/plugins/scroll-to-top-builder/helpers/ConditionsConfig.php:35
    • > PHP Warning
      Use of undefined constant YSTP_PKG_VERSION - assumed 'YSTP_PKG_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-to-top-builder/assets/views/admin/info.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/scroll-to-top-builder/config/optionsConfig.php:8
    • > PHP Notice
      Undefined variable: typeObj in wp-content/plugins/scroll-to-top-builder/assets/views/hiddenOptions.php on line 2
    • > PHP Warning
      Use of undefined constant YSTP_FILE_NAME - assumed 'YSTP_FILE_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-to-top-builder/config/config.php on line 11

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 97% 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
Please fix the following attributes: You can look at the official readme.txt

scroll-to-top-builder/scroll-to-top-builder.php Passed 13 tests

Analyzing the main PHP file in "Scroll Top - WordPress Scroll to Top plugin" version 1.3.3
34 characters long description:
Scroll to top customizable plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected18,259 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
CSS8912010,054
JavaScript51,2292904,853
PHP426242013,352

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.42
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods243
▷ Static methods4920.16%
▷ Public methods20684.77%
▷ Protected methods10.41%
▷ Private methods3614.81%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
78 PNG files occupy 0.38MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/25.png8.57KB3.31KB▼ 61.42%
(invalid) assets/img/8.png2.09KB0.00KB▼ 100.00%
assets/img/20.png0.90KB0.82KB▼ 9.20%
assets/img/40.png3.86KB2.03KB▼ 47.40%
assets/img/2.png4.86KB2.92KB▼ 39.86%