83% scroll-top-pro

Code Review | Scroll Top Pro

WordPress plugin Scroll Top Pro scored83%from 54 tests.

About plugin

  • Plugin page: scroll-top-pro
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2020
  • Latest release: Feb 18, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: developersaiful (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Scroll Top Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.58 ▼1.03
Dashboard /wp-admin3.31 ▲0.0148.78 ▼4.06
Posts /wp-admin/edit.php3.36 ▲0.0150.13 ▲1.28
Add New Post /wp-admin/post-new.php5.89 ▲0.01104.04 ▲8.02
Media Library /wp-admin/upload.php3.23 ▲0.0139.40 ▲1.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Scroll Top Pro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.62 ▼0.766.07 ▲4.3445.12 ▲1.85
Dashboard /wp-admin2,206 ▲184.86 ▼0.05120.86 ▲9.0643.39 ▲0.78
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0036.34 ▼5.1433.04 ▼1.55
Add New Post /wp-admin/post-new.php1,542 ▲2318.31 ▼4.94647.71 ▼31.8058.90 ▲0.33
Media Library /wp-admin/upload.php1,379 ▼124.19 ▼0.05100.26 ▼7.6243.91 ▼7.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 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/scroll-top-pro/index.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

scroll-top-pro/index.php 69% from 13 tests

The main PHP script in "Scroll Top Pro" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("3.3" instead of "5.2")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.2.17" instead of "7.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("scroll-top-pro.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,737 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS20335
JavaScript17016
PHP1142415

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues 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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin