77% lz-scroll-up

Code Review | LZ Scroll Up

WordPress plugin LZ Scroll Up scored 77% from 54 tests.

About plugin

  • Plugin page: lz-scroll-up
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.2
  • WordPress version: 5.8.1
  • First release: May 11, 2015
  • Latest release: May 15, 2021
  • Number of updates: 22
  • Update frequency: every 99.9 days
  • Top authors: nazmul_0ham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,004 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.84MB] [CPU: ▼187.49ms] Passed 4 tests

Server-side resources used by LZ Scroll Up
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼1.044.87 ▼29.60
Dashboard /wp-admin1.81 ▼1.245.83 ▼31.40
Posts /wp-admin/edit.php1.81 ▼1.305.35 ▼42.99
Add New Post /wp-admin/post-new.php1.81 ▼3.624.73 ▼645.96
Media Library /wp-admin/upload.php1.81 ▼1.195.82 ▼27.38
LZ Scroll Up /wp-admin/options-general.php?page=lzscrollup-settings1.815.39

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for LZ Scroll Up
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,859 ▲26316.50 ▲0.8619.26 ▲9.6747.85 ▲1.43
Dashboard /wp-admin3,005 ▲746.62 ▲0.49151.71 ▼3.37121.24 ▲17.32
Posts /wp-admin/edit.php2,777 ▲413.04 ▲0.3270.23 ▼0.27103.02 ▲11.17
Add New Post /wp-admin/post-new.php1,531 ▼15218.44 ▼0.34481.58 ▲102.83121.47 ▲13.30
Media Library /wp-admin/upload.php1,842 ▲355.41 ▲0.35144.13 ▼8.01113.22 ▼0.28
LZ Scroll Up /wp-admin/options-general.php?page=lzscrollup-settings1,7943.1197.0878.40

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    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 lz-scroll-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=lzscrollup-settings
    • > User notice in wp-includes/functions.php+5663
    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 lz-scroll-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lz-scroll-up/main-hooks.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

lz-scroll-up/main-hooks.php 85% from 13 tests

This is the main PHP file of "LZ Scroll Up" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 175 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lz-scroll-up.php" instead of "main-hooks.php")

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
There were no executable files found in this plugin267 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16219143
JavaScript22417124

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.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