84% wp-ajax-pagination

Code Review | WP Ajax Load More Pagination and Infinite Scroll

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

About plugin

  • Plugin page: wp-ajax-pagination
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 16, 2019
  • Latest release: Jan 16, 2021
  • Number of updates: 25
  • Update frequency: every 23.2 days
  • Top authors: processby (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

800+ active /7,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼9.33ms] Passed 4 tests

This is a short check of server-side resources used by WP Ajax Load More Pagination and Infinite Scroll
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2046.06 ▲3.98
Dashboard /wp-admin3.46 ▲0.1148.33 ▼15.93
Posts /wp-admin/edit.php3.57 ▲0.2152.57 ▼2.77
Add New Post /wp-admin/post-new.php6.04 ▲0.1596.26 ▼19.14
Media Library /wp-admin/upload.php3.38 ▲0.1537.97 ▲0.52
Ajax Pagination /wp-admin/options-general.php?page=wp-ajax-pagination-admin3.3734.10

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Ajax Load More Pagination and Infinite Scroll
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.18 ▼0.382.15 ▲0.5743.02 ▲0.02
Dashboard /wp-admin2,198 ▲185.53 ▼0.1483.57 ▼3.0937.99 ▼6.56
Posts /wp-admin/edit.php2,106 ▲91.96 ▼0.0141.49 ▲3.6634.53 ▼2.36
Add New Post /wp-admin/post-new.php1,531 ▲323.21 ▲0.20603.18 ▼34.2854.87 ▼13.89
Media Library /wp-admin/upload.php1,409 ▲124.24 ▲0.01108.04 ▲4.0644.24 ▼3.17
Ajax Pagination /wp-admin/options-general.php?page=wp-ajax-pagination-admin9721.6725.1634.58

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/wp-ajax-pagination/src/Admin/Customizer/CustomizeLabel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/wp-ajax-pagination/src/Admin/Customizer/CustomizeDonate.php:5

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (WP Ajax Pagination settings)
Please take inspiration from this readme.txt

wp-ajax-pagination/wp-ajax-pagination.php 92% from 13 tests

The main file in "WP Ajax Load More Pagination and Infinite Scroll" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to a folder that 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
There were no executable files found in this plugin1,732 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP254713341,567
JSON31072
Markdown153070
CSS11123

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods77
▷ Static methods56.49%
▷ Public methods7496.10%
▷ Protected methods00.00%
▷ Private methods33.90%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.70KB11.87KB▼ 45.28%