79% ajax-comment-loading

Code Review | AJAX Comment Loading

WordPress plugin AJAX Comment Loading scored79%from 54 tests.

About plugin

  • Plugin page: ajax-comment-loading
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2012
  • Latest release: Jul 9, 2012
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: markjaquith (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.43ms] Passed 4 tests

An overview of server-side resources used by AJAX Comment Loading
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.63 ▼3.40
Dashboard /wp-admin3.32 ▲0.0245.83 ▼5.61
Posts /wp-admin/edit.php3.38 ▲0.0248.94 ▲3.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.26 ▼4.30
Media Library /wp-admin/upload.php3.25 ▲0.0243.46 ▲7.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for AJAX Comment Loading
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.60 ▼0.0340.50 ▼3.20
Dashboard /wp-admin2,195 ▲185.62 ▼0.0383.89 ▼12.0840.80 ▼5.13
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0340.32 ▲4.2036.46 ▲4.59
Add New Post /wp-admin/post-new.php1,526 ▼223.17 ▲0.11677.52 ▼12.7856.61 ▼9.11
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.0099.75 ▼12.6546.34 ▼0.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ajax-comment-loading/templates/comments.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-comment-loading/ajax-comment-loading.php:16

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: comments, ajax, performance

ajax-comment-loading/ajax-comment-loading.php Passed 13 tests

The main PHP file in "AJAX Comment Loading" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
105 characters long description:
Loads comment threads asynchronously. Makes for smaller, faster pages. Originally commissioned by Google.

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
Success! There were no dangerous files found in this plugin157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131782
JavaScript20075

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin