83% wpbatch-scroll-to-top

Code Review | WPBatch Scroll to Top

WordPress plugin WPBatch Scroll to Top scored83%from 54 tests.

About plugin

  • Plugin page: wpbatch-scroll-to...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 3, 2014
  • Latest release: Oct 13, 2014
  • Number of updates: 11
  • Update frequency: every 0.9 days
  • Top authors: sujon3g (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

20+ active /1,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by WPBatch Scroll to Top
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.23 ▼0.21
Dashboard /wp-admin3.31 ▲0.0154.20 ▼3.53
Posts /wp-admin/edit.php3.36 ▲0.0151.12 ▼2.88
Add New Post /wp-admin/post-new.php5.89 ▲0.01111.24 ▲13.52
Media Library /wp-admin/upload.php3.23 ▲0.0138.85 ▼2.66

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WPBatch Scroll to Top
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.68 ▼0.726.36 ▲4.5537.07 ▼6.81
Dashboard /wp-admin2,209 ▲185.85 ▼0.0498.22 ▼8.4638.85 ▼2.67
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0138.39 ▼1.2436.70 ▲2.91
Add New Post /wp-admin/post-new.php1,542 ▲918.79 ▼4.37614.94 ▼96.5458.50 ▲1.04
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0499.66 ▼10.9343.58 ▼3.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wpbatch-scroll-to-top/scroll.php:16
    • > 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/wpbatch-scroll-to-top/scroll.php on line 16

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === wpbatch-scroll-to-top === )
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

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

The entry point to "WPBatch Scroll to Top" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpbatch-scroll-to-top.php" instead of "scroll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin695 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG100520
JavaScript21070146
PHP120918
CSS20311

PHP code Passed 2 tests

An overview 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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin