79% auto-load-next-post

Code Review | WordPress Infinite Scroll by Auto Load Next Post

WordPress plugin WordPress Infinite Scroll by Auto Load Next Post scored 79% from 54 tests.

About plugin

  • Plugin page: auto-load-next-post
  • Plugin version: 1.5.14
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: Sep 16, 2019
  • Number of updates: 69
  • Update frequency: every 23.5 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

50 reviews

Install metrics

800+ active / 52,263 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
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼1.07ms] Passed 4 tests

Analyzing server-side resources used by WordPress Infinite Scroll by Auto Load Next Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1943.56 ▲0.83
Dashboard /wp-admin3.68 ▲0.3751.60 ▼0.60
Posts /wp-admin/edit.php3.72 ▲0.3650.06 ▲3.34
Add New Post /wp-admin/post-new.php6.19 ▲0.3086.63 ▼7.85
Media Library /wp-admin/upload.php3.53 ▲0.3038.91 ▲5.46
Auto Load Next Post /wp-admin/options-general.php?page=auto-load-next-post-settings3.7143.87

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 162 new files
Database: no new tables, 11 new options
New WordPress options
auto_load_next_post_version
can_compress_scripts
auto_load_next_post_remove_comments
auto_load_next_post_load_js_in_footer
widget_recent-posts
auto_load_next_post_google_analytics
widget_theysaidso_widget
auto_load_next_post_uninstall_data
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Infinite Scroll by Auto Load Next Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲12413.71 ▼0.691.66 ▼0.1644.15 ▼1.20
Dashboard /wp-admin2,276 ▲885.89 ▲1.02106.78 ▼7.7984.03 ▲41.46
Posts /wp-admin/edit.php2,092 ▼02.02 ▲0.0235.62 ▼5.1733.27 ▼3.45
Add New Post /wp-admin/post-new.php1,519 ▼2417.64 ▼0.69593.49 ▼52.2751.82 ▼4.20
Media Library /wp-admin/upload.php1,391 ▲34.34 ▲0.09102.01 ▲0.3344.59 ▲2.49
Auto Load Next Post /wp-admin/options-general.php?page=auto-load-next-post-settings1,3002.0634.7657.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/auto-load-next-post/trunk/includes/3rd-party/plugins/wp-rocket.php
    • > /wp-content/plugins/auto-load-next-post/includes/3rd-party/plugins/wp-rocket.php
    • > /wp-content/plugins/auto-load-next-post/includes/3rd-party/3rd-party.php
    • > /wp-content/plugins/auto-load-next-post/trunk/includes/3rd-party/3rd-party.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/auto-load-next-post/trunk/template/theme-support/twentyeleven/content-alnp.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/auto-load-next-post/trunk/template/theme-support/make/content-alnp.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/auto-load-next-post/trunk/template/theme-support/oceanwp/content-alnp.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/auto-load-next-post/template/theme-support/oceanwp/content-alnp.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/auto-load-next-post/auto-load-next-post.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/auto-load-next-post/trunk/template/theme-support/twentynineteen/content-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/auto-load-next-post/template/content-alnp.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/auto-load-next-post/template/theme-support/twentynineteen/content-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/auto-load-next-post/trunk/auto-load-next-post.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/auto-load-next-post/trunk/template/theme-support/twentyten/content-alnp.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: infinite scrolling, infinite, scroll, infinite scroll

auto-load-next-post/auto-load-next-post.php Passed 13 tests

This is the main PHP file of "WordPress Infinite Scroll by Auto Load Next Post" version 1.5.14, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
100 characters long description:
Increase your pageviews on your site as readers continue reading your posts scrolling down the page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin9,005 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,3264614,952
PHP618792,3623,091
CSS415710962

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.84
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods300
▷ Static methods14247.33%
▷ Public methods28494.67%
▷ Protected methods20.67%
▷ Private methods144.67%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants36100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png11.81KB6.66KB▼ 43.62%
trunk/assets/images/icon-128x128.png7.70KB4.01KB▼ 47.97%
trunk/assets/images/icon-256x256.png11.81KB6.66KB▼ 43.62%
trunk/assets/images/banner.png5.22KB1.94KB▼ 62.81%
assets/images/banner.png5.22KB1.94KB▼ 62.81%