94% hina-ajax-comment

Code Review | ajax Post Comment

WordPress plugin ajax Post Comment scored 94% from 54 tests.

About plugin

  • Plugin page: hina-ajax-comment
  • Plugin version: 0.1-alpha-20161129
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7
  • WordPress version: 5.8.1
  • First release: Dec 30, 2015
  • Latest release: Dec 1, 2016
  • Number of updates: 17
  • Update frequency: every 19.7 days
  • Top authors: hnle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,170 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼136.36ms] Passed 4 tests

A check of server-side resources used by ajax Post Comment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1339.92 ▲14.58
Dashboard /wp-admin3.08 ▲0.0241.62 ▼6.98
Posts /wp-admin/edit.php3.13 ▲0.0249.74 ▲6.47
Add New Post /wp-admin/post-new.php5.44 ▼0.00112.22 ▼538.56
Media Library /wp-admin/upload.php3.02 ▲0.0132.55 ▼6.38

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ajax Post Comment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,808 ▲23617.48 ▲1.9532.05 ▲20.7452.34 ▲2.65
Dashboard /wp-admin2,967 ▲376.04 ▲0.08154.17 ▲0.08122.35 ▲7.91
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0191.29 ▲25.02117.82 ▲24.89
Add New Post /wp-admin/post-new.php1,683 ▼018.70 ▲0.42401.59 ▼4.67111.71 ▼13.97
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.06160.07 ▲1.80125.70 ▼2.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hina-ajax-comment/inc/class-hina-ajax-comment.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hina-ajax-comment/inc/class-hina-ajax-comment.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hina-ajax-comment/inc/class-hina-ajax-comment.php:97

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
5 plugin tags: rest-api, comment, comments, wp-api, ajax

hina-ajax-comment/hina-ajax-comment.php 85% from 13 tests

This is the main PHP file of "ajax Post Comment" version 0.1-alpha-20161129, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "0.1-alpha-20161129")
  • Domain Path: The domain path folder does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected230 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10487
TypeScript1312187
PHP3214256

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin