94% malinky-ajax-pagination

Code Review | Ajax Pagination and Infinite Scroll

WordPress plugin Ajax Pagination and Infinite Scroll scored 94% from 54 tests.

About plugin

  • Plugin page: malinky-ajax-pagi...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.7.2
  • WordPress version: 5.9.2
  • First release: Sep 9, 2015
  • Latest release: Feb 2, 2017
  • Number of updates: 25
  • Update frequency: every 20.5 days
  • Top authors: malinkymedia (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

3,000+ active / 47,118 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼294.06ms] Passed 4 tests

A check of server-side resources used by Ajax Pagination and Infinite Scroll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1763.56 ▲6.01
Dashboard /wp-admin3.57 ▲0.1542.54 ▲0.54
Posts /wp-admin/edit.php3.80 ▲0.1548.66 ▲7.92
Add New Post /wp-admin/post-new.php7.01 ▲0.04102.15 ▼1,177.10
Media Library /wp-admin/upload.php3.42 ▲0.1324.71 ▼5.69
Ajax Pagination Settings /wp-admin/options-general.php?page=malinky-ajax-pagination-settings-13.4228.88

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Ajax Pagination and Infinite Scroll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,975 ▲22117.80 ▲2.145.67 ▼0.712.02 ▼0.68
Dashboard /wp-admin3,112 ▲2518.04 ▲1.73142.68 ▲8.09203.52 ▲33.40
Posts /wp-admin/edit.php2,930 ▲2425.14 ▲1.9180.42 ▲14.16191.18 ▼1.25
Add New Post /wp-admin/post-new.php1,673 ▲716.03 ▼4.41403.99 ▼57.04172.19 ▼6.10
Media Library /wp-admin/upload.php1,711 ▲135.55 ▲0.01129.91 ▼12.35190.50 ▲2.68
Ajax Pagination Settings /wp-admin/options-general.php?page=malinky-ajax-pagination-settings-11,5074.2869.22209.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/malinky-ajax-pagination/malinky-ajax-pagination.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

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

The entry point to "Ajax Pagination and Infinite Scroll" version 2.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 233 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
Everything looks great! No dangerous files found in this plugin686 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP495189556
PO File14043125
JavaScript3003
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity18.00
▷ Minimum class complexity8.00
▷ Maximum class complexity28.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin