84% wp-scroll-depth

Code Review | WP Scroll Depth

WordPress plugin WP Scroll Depth scored84%from 54 tests.

About plugin

  • Plugin page: wp-scroll-depth
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.0.0
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: Dec 6, 2018
  • Number of updates: 43
  • Update frequency: every 36.2 days
  • Top authors: firebrandllc (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /23,548 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.67ms] Passed 4 tests

An overview of server-side resources used by WP Scroll Depth
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0447.56 ▲7.24
Dashboard /wp-admin3.37 ▲0.0246.79 ▼18.15
Posts /wp-admin/edit.php3.42 ▲0.0653.69 ▲4.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.77 ▼0.97
Media Library /wp-admin/upload.php3.29 ▲0.0636.28 ▲0.11
ScrollDepth /wp-admin/options-general.php?page=wp-scrolldepth-admin-m13.2633.90

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Scroll Depth
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.71 ▼0.675.89 ▲3.9538.11 ▼6.01
Dashboard /wp-admin2,210 ▲254.96 ▼0.94105.07 ▼15.2941.91 ▼2.20
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0739.94 ▲1.6833.37 ▼3.31
Add New Post /wp-admin/post-new.php1,536 ▲1723.02 ▲0.08625.76 ▼39.5758.32 ▼3.33
Media Library /wp-admin/upload.php1,392 ▲74.18 ▼0.0993.22 ▼12.7242.88 ▼1.66
ScrollDepth /wp-admin/options-general.php?page=wp-scrolldepth-admin-m19762.0222.2631.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× 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/wp-scroll-depth/privacy.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-scroll-depth/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-scroll-depth/wp-scroll-depth.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: Please take inspiration from this readme.txt

wp-scroll-depth/wp-scroll-depth.php 92% from 13 tests

The main file in "WP Scroll Depth" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,143 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
Markdown31520612
PHP36983237
JavaScript27462215
HTML16050
JSON10027
Bourne Shell1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/wp-scroll-depth_320.png8.91KB6.46KB▼ 27.46%
assets/banner-772x250.png30.56KB13.46KB▼ 55.96%
assets/screenshot-3.png56.49KB19.67KB▼ 65.19%
assets/screenshot-2.png56.94KB19.59KB▼ 65.60%
assets/screenshot-1.png98.07KB31.51KB▼ 67.87%