67% np-scrollup

Code Review | NP ScrollUp

WordPress plugin NP ScrollUp scored67%from 54 tests.

About plugin

  • Plugin page: np-scrollup
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2016
  • Latest release: Jun 4, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: golamahmed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /526 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.82MB] [CPU: ▼49.77ms] Passed 4 tests

Server-side resources used by NP ScrollUp
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.304.94 ▼34.68
Dashboard /wp-admin2.19 ▼1.127.07 ▼39.45
Posts /wp-admin/edit.php2.19 ▼1.176.18 ▼40.12
Add New Post /wp-admin/post-new.php2.19 ▼3.705.83 ▼84.83
Media Library /wp-admin/upload.php2.19 ▼1.044.98 ▼26.95
NP ScrollUp Options /wp-admin/options-general.php?page=npscrollup-settings2.195.93

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for NP ScrollUp
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲19514.35 ▼0.397.86 ▲5.6744.39 ▼0.09
Dashboard /wp-admin2,232 ▲405.11 ▲0.17101.37 ▼15.2039.92 ▼6.40
Posts /wp-admin/edit.php2,120 ▲312.30 ▲0.2740.25 ▲4.9835.12 ▼1.77
Add New Post /wp-admin/post-new.php1,538 ▲1923.76 ▲0.51650.36 ▼33.2235.51 ▼17.43
Media Library /wp-admin/upload.php1,417 ▲264.46 ▲0.2897.03 ▼4.6541.93 ▼0.41
NP ScrollUp Options /wp-admin/options-general.php?page=npscrollup-settings1,5622.7657.4029.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function 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 np-custom--main handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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
    • > GET request to /wp-admin/options-general.php?page=npscrollup-settings
    • > User notice in wp-includes/functions.php+5905
    Function 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 np-custom--main handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=npscrollup-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style 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 np_scroll_up handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=npscrollup-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style 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 np_scrollup_font_awesome 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/np-scrollup/np_scoll_up.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (In this screenshot, you can see the first half of the options panel of this plugin.), #2 (In this screenshot, you can see remaining of the options panel of this plugin.), #3 (In this screenshot, you can see a live demo of this plugin.), #4 (In this screenshot, you can see a live demo with scroll to the top text of this plugin.)
You can look at the official readme.txt

np-scrollup/np_scoll_up.php 85% from 13 tests

The main PHP file in "NP ScrollUp" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 221 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("np-scrollup.php" instead of "np_scoll_up.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin3,112 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS213132,103
SVG100655
PHP15452350
JavaScript2064

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.60MB with 0.37MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png231.92KB68.37KB▼ 70.52%
screenshot-2.png91.50KB43.25KB▼ 52.73%
screenshot-1.png71.72KB34.29KB▼ 52.18%
screenshot-3.png218.37KB63.94KB▼ 70.72%