83% infinite-scroll-and-load-more-ajax-pagination

Code Review | Infinite Scroll and Load More Ajax Pagination

WordPress plugin Infinite Scroll and Load More Ajax Pagination scored83%from 54 tests.

About plugin

  • Plugin page: infinite-scroll-a...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.4
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Dec 16, 2015
  • Number of updates: 17
  • Update frequency: every 3.8 days
  • Top authors: pixellanguage (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

400+ active /11,560 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by Infinite Scroll and Load More Ajax Pagination
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.49 ▼0.88
Dashboard /wp-admin3.35 ▲0.0549.51 ▼3.87
Posts /wp-admin/edit.php3.41 ▲0.0551.70 ▲1.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.62 ▼5.63
Media Library /wp-admin/upload.php3.28 ▲0.0537.74 ▼0.42
Infinite Load /wp-admin/admin.php?page=pix-infinite-load3.2737.79

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
pix_infinite_load

Browser metrics Passed 4 tests

A check of browser resources used by Infinite Scroll and Load More Ajax Pagination
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2514.30 ▼0.351.75 ▼0.4543.82 ▼0.15
Dashboard /wp-admin2,217 ▲375.68 ▲0.1382.31 ▼14.7164.80 ▲23.63
Posts /wp-admin/edit.php2,122 ▲252.00 ▼0.0339.53 ▲0.1337.83 ▼0.91
Add New Post /wp-admin/post-new.php1,562 ▲3423.27 ▲0.24669.74 ▼17.1545.47 ▼9.85
Media Library /wp-admin/upload.php1,425 ▲254.16 ▼0.0798.42 ▼12.8868.76 ▲21.46
Infinite Load /wp-admin/admin.php?page=pix-infinite-load1,1973.0238.0266.31

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • pix_infinite_load
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/infinite-scroll-and-load-more-ajax-pagination/index.php:14

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)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.jpg)
The official readme.txt is a good inspiration

infinite-scroll-and-load-more-ajax-pagination/index.php 77% from 13 tests

The main PHP script in "Infinite Scroll and Load More Ajax Pagination" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("infinite-scroll-and-load-more-ajax-pagination.php" instead of "index.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected336 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34820164
PHP13532156
CSS20016

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.13
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/question.png0.85KB0.65KB▼ 23.30%
images/logo.png3.19KB0.62KB▼ 80.71%