79% wp-ajax-loadmore

Code Review | WP Ajax Loadmore

WordPress plugin WP Ajax Loadmore scored79%from 54 tests.

About plugin

  • Plugin page: wp-ajax-loadmore
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Nov 20, 2018
  • Latest release: Nov 20, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: libinprasanth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /592 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.07MB] [CPU: ▼10.35ms] Passed 4 tests

Server-side resources used by WP Ajax Loadmore
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.95 ▲0.75
Dashboard /wp-admin3.39 ▲0.0450.19 ▼18.61
Posts /wp-admin/edit.php3.44 ▲0.0850.12 ▼5.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.78 ▼17.56
Media Library /wp-admin/upload.php3.31 ▲0.0836.00 ▼0.06
All loadmore /wp-admin/edit.php?post_type=ajaxloadmore3.3540.80
Add New /wp-admin/post-new.php?post_type=ajaxloadmore3.3751.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Ajax Loadmore
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲15713.39 ▼0.738.90 ▲6.9137.67 ▼4.36
Dashboard /wp-admin2,216 ▲455.54 ▲0.0186.34 ▼1.2141.81 ▼0.50
Posts /wp-admin/edit.php2,127 ▲272.02 ▼0.0137.23 ▲2.4437.69 ▼1.62
Add New Post /wp-admin/post-new.php1,551 ▲1421.17 ▲3.13647.96 ▼16.2258.88 ▼8.95
Media Library /wp-admin/upload.php1,427 ▲274.20 ▼0.0696.41 ▼8.4746.83 ▲2.21
All loadmore /wp-admin/edit.php?post_type=ajaxloadmore1,1041.9435.4030.78
Add New /wp-admin/post-new.php?post_type=ajaxloadmore2,0383.94104.3163.41

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-ajax-loadmore/inc/loader.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-ajax-loadmore/wp-ajax-loadmore.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: loadmore, ajax

wp-ajax-loadmore/wp-ajax-loadmore.php Passed 13 tests

The main file in "WP Ajax Loadmore" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
21 characters long description:
Load Post using ajax.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected290 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23369232
JavaScript13239
Markdown15019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png54.97KB23.51KB▼ 57.24%