93% kento-scroll-jump-top

Code Review | Kento Scroll Jump Top

WordPress plugin Kento Scroll Jump Top scored 93% from 54 tests.

About plugin

  • Plugin page: kento-scroll-jump...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 5.8.1
  • First release: Nov 16, 2014
  • Latest release: Jun 9, 2015
  • Number of updates: 10
  • Update frequency: every 34.4 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,241 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Kento Scroll Jump Top
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.20 ▲16.14
Dashboard /wp-admin3.07 ▲0.0234.21 ▲0.07
Posts /wp-admin/edit.php3.12 ▲0.0243.26 ▼0.06
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.47 ▼562.01
Media Library /wp-admin/upload.php3.01 ▲0.0132.45 ▼13.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Kento Scroll Jump Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲24016.28 ▲0.7613.09 ▲4.6048.24 ▲0.04
Dashboard /wp-admin2,996 ▲675.88 ▼0.26141.54 ▲6.07114.59 ▲6.13
Posts /wp-admin/edit.php2,765 ▲262.70 ▲0.0064.05 ▼7.61102.71 ▲8.16
Add New Post /wp-admin/post-new.php1,691 ▲818.67 ▲0.11353.82 ▼37.0786.52 ▼34.27
Media Library /wp-admin/upload.php1,836 ▲295.06 ▲0.02140.00 ▼38.08127.05 ▼8.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kento-scroll-jump-top/kento-scroll-to-top-admin.php:5
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kento-scroll-jump-top/kento-scroll-to-top.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/kento-scroll-jump-top/kento-scroll-to-top.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Admin Panel)
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

kento-scroll-jump-top/kento-scroll-to-top.php 85% from 13 tests

"Kento Scroll Jump Top" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please improve your description making it at least 10 characters long (currently 0 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("kento-scroll-jump-top.php" instead of "kento-scroll-to-top.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin803 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2138208383
JavaScript14114288
PHP25816132

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
28 PNG files occupy 0.44MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/square-hover.png1.26KB0.33KB▼ 73.95%
css/arrow-one.png1.70KB1.15KB▼ 32.37%
css/home-one.png0.48KB0.49KB0.00%
css/black.png4.13KB1.29KB▼ 68.75%
css/home.png0.87KB0.92KB0.00%