90% ajaxify-wp-post-comment-form

Code Review | Ajaxify WP Post Comment Form

WordPress plugin Ajaxify WP Post Comment Form scored90%from 54 tests.

About plugin

  • Plugin page: ajaxify-wp-post-c...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Dec 12, 2019
  • Latest release: Jul 5, 2022
  • Number of updates: 32
  • Update frequency: every 29.3 days
  • Top authors: kairav (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /1,111 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.59ms] Passed 4 tests

Server-side resources used by Ajaxify WP Post Comment Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.20 ▼1.28
Dashboard /wp-admin3.34 ▲0.0449.47 ▲0.80
Posts /wp-admin/edit.php3.40 ▲0.0449.40 ▼1.17
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.26 ▼17.46
Media Library /wp-admin/upload.php3.27 ▲0.0433.69 ▼2.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: 1 new table, 6 new options
New tables
wp_ajaxify_wp_post_comments_form
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Ajaxify WP Post Comment Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13413.47 ▼0.8811.94 ▲10.1140.82 ▼2.45
Dashboard /wp-admin2,214 ▲375.57 ▼0.0195.87 ▲10.0040.66 ▲0.06
Posts /wp-admin/edit.php2,119 ▲162.02 ▲0.0140.04 ▲0.4535.56 ▼1.38
Add New Post /wp-admin/post-new.php1,543 ▲1723.73 ▲0.65665.92 ▲57.3477.85 ▲24.05
Media Library /wp-admin/upload.php1,422 ▲224.18 ▼0.0497.18 ▼5.0743.58 ▼2.20

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
1 plugin tags: post comment form

ajaxify-wp-post-comment-form/ajaxify-wp-post-comment-form.php Passed 13 tests

The primary PHP file in "Ajaxify WP Post Comment Form" version 1.8 is used by WordPress to initiate all plugin functionality
50 characters long description:
Submit Post comment form using Ajax functionality.

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
Success! There were no dangerous files found in this plugin487 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP632105214
CSS249157
JavaScript2734116

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.67
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/common-post-form.png9.80KB5.61KB▼ 42.71%