93% ac-scroll-up

Code Review | Ac-Scroll-Up

WordPress plugin Ac-Scroll-Up scored 93% from 54 tests.

About plugin

  • Plugin page: ac-scroll-up
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.8.1
  • First release: Mar 11, 2015
  • Latest release: Mar 11, 2015
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: Asif Ahmmad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 623 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼147.09ms] Passed 4 tests

Analyzing server-side resources used by Ac-Scroll-Up
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0236.30 ▲11.03
Dashboard /wp-admin3.08 ▲0.0240.35 ▼1.04
Posts /wp-admin/edit.php3.13 ▲0.0234.54 ▲0.30
Add New Post /wp-admin/post-new.php5.44 ▲0.0073.57 ▼584.58
Media Library /wp-admin/upload.php3.03 ▲0.0223.99 ▼3.05
Ac-Scroll-Up /wp-admin/options-general.php?page=ac-scroll-up/scroll-settings.php3.0021.04

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Ac-Scroll-Up
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲21916.59 ▲1.0310.11 ▲1.3870.58 ▼9.78
Dashboard /wp-admin2,963 ▲676.69 ▲0.60118.86 ▼13.09167.98 ▼12.26
Posts /wp-admin/edit.php2,776 ▲363.55 ▲0.3365.56 ▲1.93156.24 ▲17.18
Add New Post /wp-admin/post-new.php1,907 ▼1,82815.82 ▼2.47419.04 ▼26.95159.97 ▼2.86
Media Library /wp-admin/upload.php1,785 ▲365.88 ▲0.39125.88 ▼14.55180.57 ▼5.79
Ac-Scroll-Up /wp-admin/options-general.php?page=ac-scroll-up/scroll-settings.php1,4593.4375.57109.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
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 no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 2× 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/ac-scroll-up/scroll-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ac-scroll-up/scroll-settings.php:3

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

readme.txt 81% 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:
  • Screenshots: Please add images for these screenshots: #1 (Scroll up arrow on bottom right.), #2 (Go to setting page.), #3 (Set up your icon color and icon background.)
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === ac-scroll-up === )
You can take inspiration from this readme.txt

ac-scroll-up/main.php 92% from 13 tests

"Ac-Scroll-Up" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ac-scroll-up.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected627 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG100520
PHP2352084
CSS20317
JavaScript2276

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot-1.png11.13KB6.19KB▼ 44.36%
Screenshot-2.png4.39KB3.04KB▼ 30.79%
Screenshot-3.png7.00KB3.75KB▼ 46.39%