88% as-nice-scroll

Code Review | As Nice Scroll

WordPress plugin As Nice Scroll scored 88% from 54 tests.

About plugin

  • Plugin page: as-nice-scroll
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 5.8.1
  • First release: Jul 3, 2015
  • Latest release: Jun 2, 2016
  • Number of updates: 15
  • Update frequency: every 22.3 days
  • Top authors: anuislam (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active / 2,945 total downloads


Plugin footprint Passed 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: ▲0.08MB] [CPU: ▼140.13ms] Passed 4 tests

Server-side resources used by As Nice Scroll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0740.46 ▲5.24
Dashboard /wp-admin3.14 ▲0.0947.32 ▼3.09
Posts /wp-admin/edit.php3.19 ▲0.0946.60 ▼1.62
Add New Post /wp-admin/post-new.php5.50 ▲0.0795.88 ▼556.09
Media Library /wp-admin/upload.php3.08 ▲0.0836.73 ▲0.29
As option /wp-admin/themes.php?page=as_options3.0632.12

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by As Nice Scroll
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,907 ▲33516.96 ▲1.4622.83 ▲15.4350.24 ▼3.40
Dashboard /wp-admin3,005 ▲746.54 ▲0.38149.55 ▼15.90117.83 ▼4.85
Posts /wp-admin/edit.php2,777 ▲413.01 ▲0.3271.76 ▼2.39112.96 ▲4.25
Add New Post /wp-admin/post-new.php1,522 ▼16118.41 ▼0.15376.06 ▼28.74119.00 ▼0.74
Media Library /wp-admin/upload.php1,842 ▲325.40 ▲0.36136.83 ▼22.09122.15 ▲4.26
As option /wp-admin/themes.php?page=as_options1,5962.5761.38103.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 2× 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/as-nice-scroll/as-nicescroll.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/as-nice-scroll/settings/as_scroll_option.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/themes.php?page=as_options
    • > Javascript (severe) in unknown
    /wp-content/plugins/as-nice-scroll/js/as_admin_custom.js?ver=1 15:23 Uncaught TypeError: $(...).wpColorPicker is not a function


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 148 tag instead of maximum 10
You can look at the official readme.txt

as-nice-scroll/as-nicescroll.php 92% from 13 tests

The principal PHP file in "As Nice Scroll" v. 1.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("as-nice-scroll.php" instead of "as-nicescroll.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
Good job! No executable or dangerous file extensions detected493 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions24100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
settings/img/People.png19.91KB4.27KB▼ 78.54%
settings/img/github.png16.12KB2.46KB▼ 84.75%
settings/img/wordpress.png20.26KB3.38KB▼ 83.33%
settings/img/fiverr.png27.87KB5.27KB▼ 81.10%
settings/img/right.png15.12KB1.31KB▼ 91.31%