78% catch-scroll-progress-bar

Code Review | Catch Scroll Progress Bar

WordPress plugin Catch Scroll Progress Bar scored78%from 54 tests.

About plugin

  • Plugin page: catch-scroll-prog...
  • Plugin version: 1.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Mar 25, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 16
  • Update frequency: every 106.1 days
  • Top authors: catchthemes (93.75%)maheshmaharjan (12.5%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /10,350 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.12ms] Passed 4 tests

A check of server-side resources used by Catch Scroll Progress Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1738.88 ▼0.43
Dashboard /wp-admin3.47 ▲0.1746.37 ▼3.49
Posts /wp-admin/edit.php3.58 ▲0.2350.26 ▲3.63
Add New Post /wp-admin/post-new.php6.05 ▲0.1695.31 ▼7.49
Media Library /wp-admin/upload.php3.39 ▲0.1633.42 ▲2.94

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Catch Scroll Progress Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13513.81 ▼0.548.65 ▲6.9438.08 ▼6.77
Dashboard /wp-admin2,214 ▲345.61 ▼0.0794.61 ▲0.7742.73 ▲3.59
Posts /wp-admin/edit.php2,116 ▲131.96 ▼0.1140.83 ▼0.1035.85 ▼4.13
Add New Post /wp-admin/post-new.php1,541 ▲1322.89 ▲0.08634.39 ▲14.6254.69 ▲1.01
Media Library /wp-admin/upload.php1,416 ▲194.26 ▲0.07100.11 ▼2.1143.26 ▼6.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/catch-scroll-progress-bar/public/partials/catch-scroll-progress-bar-public-display.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/catch-scroll-progress-bar/admin/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-scroll-progress-bar/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-scroll-progress-bar/admin/partials/dashboard-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/catch-scroll-progress-bar/includes/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catch-scroll-progress-bar/includes/ctp-tabs-removal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-scroll-progress-bar/admin/partials/catch-scroll-progress-bar-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: scroll, progressbar, reading, progress bar

catch-scroll-progress-bar/catch-scroll-progress-bar.php 92% from 13 tests

"Catch Scroll Progress Bar" version 1.6.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 174 characters long)

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
Good job! No executable or dangerous file extensions detected1,878 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP172746321,118
CSS213722693
JavaScript513967

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.32
Average class complexity13.50
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%