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: 6.3.1
  • 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

600+ active / 130,677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲4.03ms] Passed 4 tests

A check of server-side resources used by Advanced AJAX Page Loader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.12 ▼7.53
Dashboard /wp-admin3.39 ▲0.0856.73 ▲1.92
Posts /wp-admin/edit.php3.50 ▲0.1458.59 ▲11.65
Add New Post /wp-admin/post-new.php5.97 ▲0.08109.04 ▲10.06
Media Library /wp-admin/upload.php3.31 ▲0.0850.32 ▲16.16
Advanced Ajax Page Loader /wp-admin/options-general.php?page=AdvancedAjaxPageLoader3.3146.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 23 new options
New WordPress options
db_upgraded
AAPL_scroll_top
AAPL_click_code
AAPL_js_debug
AAPL_commercial
AAPL_reload_code
AAPL_content_id
can_compress_scripts
AAPL_loading_img
AAPL_track_analytics
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced AJAX Page Loader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲18814.16 ▼0.4810.53 ▲8.5239.17 ▼8.28
Dashboard /wp-admin2,213 ▲284.84 ▼1.02108.57 ▲1.8043.61 ▼3.40
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0439.91 ▲2.9234.70 ▲0.61
Add New Post /wp-admin/post-new.php1,537 ▲623.31 ▲5.26590.48 ▼52.3051.75 ▼4.91
Media Library /wp-admin/upload.php1,392 ▲14.17 ▼0.0495.07 ▼12.9242.33 ▼3.98
Advanced Ajax Page Loader /wp-admin/options-general.php?page=AdvancedAjaxPageLoader1,4952.0326.5243.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 23 options
    • AAPL_track_analytics
    • widget_theysaidso_widget
    • AAPL_commercial
    • AAPL_scroll_top
    • can_compress_scripts
    • AAPL_ignore_list
    • AAPL_version
    • AAPL_click_code
    • AAPL_search_class
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 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 | 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/advanced-ajax-page-loader/options.php:3

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: loader, jquery, ajax, dynamic, post...

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

The primary PHP file in "Advanced AJAX Page Loader" version 2.7.7 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin733 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP210060523
JavaScript35869210

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%