90% ajax-load-more-rest-api

Code Review | Ajax Load More: REST API

WordPress plugin Ajax Load More: REST API scored90%from 54 tests.

About plugin

  • Plugin page: ajax-load-more-re...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2017
  • Latest release: Feb 16, 2023
  • Number of updates: 13
  • Update frequency: every 166.5 days
  • Top authors: dcooney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,741 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
Installer ran successfully

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

Server-side resources used by Ajax Load More: REST API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.13 ▲1.18
Dashboard /wp-admin3.35 ▲0.0548.89 ▲2.90
Posts /wp-admin/edit.php3.40 ▲0.0552.01 ▲5.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.87 ▼12.02
Media Library /wp-admin/upload.php3.28 ▲0.0540.35 ▲5.84

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ajax Load More: REST API
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12013.51 ▼1.129.16 ▲7.6242.93 ▲3.17
Dashboard /wp-admin2,198 ▲215.64 ▼0.0287.18 ▼2.7338.36 ▼3.62
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0136.04 ▲1.6333.86 ▼4.33
Add New Post /wp-admin/post-new.php1,526 ▼223.33 ▲0.38666.06 ▲2.7656.45 ▼5.36
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0397.53 ▼2.3641.29 ▼5.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

ajax-load-more-rest-api/ajax-load-more-rest-api.php Passed 13 tests

The main PHP script in "Ajax Load More: REST API" version 1.2.3 is automatically included on every request by WordPress
78 characters long description:
An Ajax Load More extension for infinite scrolling with the WordPress REST API

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
Everything looks great! No dangerous files found in this plugin213 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP243140213

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected