78% auto-scroll-for-reading

Code Review | Auto scroll for reading

WordPress plugin Auto scroll for reading scored78%from 54 tests.

About plugin

  • Plugin page: auto-scroll-for-r...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2021
  • Latest release: Feb 8, 2023
  • Number of updates: 31
  • Update frequency: every 14.9 days
  • Top authors: wpglob (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,207 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
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.12ms] Passed 4 tests

A check of server-side resources used by Auto scroll for reading
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2045.55 ▲2.91
Dashboard /wp-admin3.52 ▲0.2149.53 ▼7.48
Posts /wp-admin/edit.php3.61 ▲0.2651.28 ▼1.01
Add New Post /wp-admin/post-new.php6.21 ▲0.3290.02 ▼4.25
Media Library /wp-admin/upload.php3.46 ▲0.2340.98 ▲0.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 43 new files
Database: 1 new table, 7 new options
New tables
wp_wpgautoscroll_settings
New WordPress options
widget_recent-posts
widget_recent-comments
wpg_auto_scroll_db_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Auto scroll for reading: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲16913.80 ▼0.608.84 ▲7.1837.20 ▼8.80
Dashboard /wp-admin2,193 ▲195.56 ▲0.0295.48 ▼5.7276.92 ▲33.01
Posts /wp-admin/edit.php2,116 ▲162.01 ▲0.0238.67 ▲1.7233.38 ▼5.06
Add New Post /wp-admin/post-new.php1,692 ▲16422.43 ▼0.58661.30 ▼51.5659.89 ▲0.12
Media Library /wp-admin/upload.php1,413 ▲134.19 ▼0.0199.43 ▼14.3881.63 ▲34.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/auto-scroll-for-reading/admin/partials/auto-scroll-for-reading-admin-display.php
    • > /wp-content/plugins/auto-scroll-for-reading/public/partials/auto-scroll-for-reading-public-display.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(AUTO_SCROLL_FOR_READING_ADMIN_PATH/partials/settings/auto-scroll-for-reading-settings-actions-options.php): failed to open stream: No such file or directory in wp-content/plugins/auto-scroll-for-reading/admin/partials/settings/auto-scroll-for-reading-settings-display.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'AUTO_SCROLL_FOR_READING_ADMIN_PATH/partials/settings/auto-scroll-for-reading-settings-actions-options.php' (include_path='.:/usr/share/php') in wp-content/plugins/auto-scroll-for-reading/admin/partials/settings/auto-scroll-for-reading-settings-display.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/auto-scroll-for-reading/admin/partials/settings/auto-scroll-for-reading-settings-actions-options.php:2
    • > PHP Warning
      Use of undefined constant AUTO_SCROLL_FOR_READING_ADMIN_PATH - assumed 'AUTO_SCROLL_FOR_READING_ADMIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-scroll-for-reading/admin/partials/settings/auto-scroll-for-reading-settings-display.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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 to be fixed: The official readme.txt is a good inspiration

auto-scroll-for-reading/auto-scroll-for-reading.php Passed 13 tests

The entry point to "Auto scroll for reading" version 1.1.2 is a PHP file that has certain tags in its header comment area
85 characters long description:
Let your readers easily scroll your content. Add automatic scrolling to your website.

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
Success! There were no dangerous files found in this plugin4,248 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP16198573801
JavaScript78992430
CSS85724346

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods42
▷ Static methods511.90%
▷ Public methods3788.10%
▷ Protected methods00.00%
▷ Private methods511.90%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icons/auto-scroll-for-reading-logo.png0.64KB0.64KB0.00%