78% advanced-ajax-page-loader

Code Review | Advanced AJAX Page Loader

WordPress plugin Advanced AJAX Page Loader scored 78% from 54 tests.

About plugin

  • Plugin page: advanced-ajax-pag...
  • Plugin version: 2.7.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-4.5
  • WordPress version: 5.9.2
  • First release: Mar 12, 2012
  • Latest release: Jul 3, 2016
  • Number of updates: 107
  • Update frequency: every 14.7 days
  • Top authors: deano1987 (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

900+ active / 129,153 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼284.28ms] Passed 4 tests

A check of server-side resources used by Advanced AJAX Page Loader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1057.33 ▲7.94
Dashboard /wp-admin3.49 ▲0.0840.46 ▲7.93
Posts /wp-admin/edit.php3.72 ▲0.0844.26 ▲8.66
Add New Post /wp-admin/post-new.php6.96 ▼0.01100.26 ▼1,160.36
Media Library /wp-admin/upload.php3.37 ▲0.0832.55 ▲7.37
Advanced Ajax Page Loader /wp-admin/options-general.php?page=AdvancedAjaxPageLoader3.3731.64

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 17 new options
New WordPress options
AAPL_loading_error_code
AAPL_reload_code
AAPL_track_analytics
AAPL_content_id
AAPL_loading_code
AAPL_loading_img
AAPL_search_class
AAPL_commercial
AAPL_scroll_top
AAPL_upload_error
...

Browser metrics Passed 4 tests

A check of browser resources used by Advanced AJAX Page Loader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,897 ▲14316.46 ▲0.7615.03 ▲8.8317.54 ▲15.12
Dashboard /wp-admin2,893 ▲356.14 ▼0.03117.13 ▼14.69153.05 ▼9.29
Posts /wp-admin/edit.php2,696 ▲53.23 ▼0.1363.51 ▼5.06139.45 ▼4.69
Add New Post /wp-admin/post-new.php1,776 ▲8621.51 ▲3.42449.23 ▼13.00162.69 ▲1.92
Media Library /wp-admin/upload.php1,703 ▲55.50 ▲0.01146.12 ▲9.46187.11 ▲6.44
Advanced Ajax Page Loader /wp-admin/options-general.php?page=AdvancedAjaxPageLoader1,9582.3957.32177.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 17 options
    • AAPL_loading_code
    • AAPL_search_class
    • AAPL_js_debug
    • AAPL_commercial
    • AAPL_track_analytics
    • AAPL_scroll_top
    • AAPL_ignore_list
    • AAPL_upload_error
    • AAPL_click_code
    • AAPL_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 38 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=AdvancedAjaxPageLoader
    • > Notice in wp-content/plugins/advanced-ajax-page-loader/options.php+132
    Undefined variable: src
  • 38 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=AdvancedAjaxPageLoader
    • > Notice in wp-content/plugins/advanced-ajax-page-loader/options.php+132
    Undefined variable: dst

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/advanced-ajax-page-loader/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/advanced-ajax-page-loader/advanced-ajax-page-loader.php:23

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: posts, ajax, post, loader, loading...

advanced-ajax-page-loader/advanced-ajax-page-loader.php 92% from 13 tests

"Advanced AJAX Page Loader" version 2.7.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 267 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin733 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP210060523
JavaScript35869210

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
coming_soon_graphic.png122.81KB53.53KB▼ 56.41%