84% ajax-comments-refueled

Code Review | AJAX Comments Refueled

WordPress plugin AJAX Comments Refueled scored84%from 54 tests.

About plugin

  • Plugin page: ajax-comments-ref...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Sep 26, 2022
  • Number of updates: 6
  • Update frequency: every 59.2 days
  • Top authors: jweathe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by AJAX Comments Refueled
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.69 ▼10.29
Dashboard /wp-admin3.32 ▲0.0245.58 ▼7.39
Posts /wp-admin/edit.php3.37 ▲0.0144.94 ▲1.28
Add New Post /wp-admin/post-new.php5.91 ▲0.0180.67 ▼15.43
Media Library /wp-admin/upload.php3.25 ▲0.0135.80 ▲1.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

AJAX Comments Refueled: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.80 ▲0.421.75 ▼0.1839.67 ▼2.77
Dashboard /wp-admin2,209 ▲215.85 ▲0.0395.34 ▼5.4939.88 ▼4.62
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0034.70 ▲0.4732.69 ▼5.84
Add New Post /wp-admin/post-new.php1,514 ▼517.57 ▼5.56670.54 ▼0.4663.30 ▲6.48
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.06111.59 ▲12.4948.14 ▲3.36

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ajax-comments-refueled/comments.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function planetjon\\wordpress\\ajax_comments\\add_action() in wp-content/plugins/ajax-comments-refueled/plugin.php:21

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: ajax, comments

ajax-comments-refueled/plugin.php 92% from 13 tests

The primary PHP file in "AJAX Comments Refueled" version 1.2.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ajax-comments-refueled.php" instead of "plugin.php")

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
There were no executable files found in this plugin150 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2170112
PHP2111338

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.29
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
Namespaces1
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%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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