84% jc-ajax-comment

Code Review | JC Ajax Comments

WordPress plugin JC Ajax Comments scored84%from 54 tests.

About plugin

  • Plugin page: jc-ajax-comment
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2015
  • Latest release: Feb 27, 2015
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: llavillaccama (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,013 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.19ms] Passed 4 tests

Server-side resources used by JC Ajax Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.39 ▲2.51
Dashboard /wp-admin3.31 ▲0.0043.12 ▼7.30
Posts /wp-admin/edit.php3.36 ▲0.0043.19 ▼5.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.92 ▼23.66
Media Library /wp-admin/upload.php3.23 ▲0.0036.08 ▼0.38

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by JC Ajax Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16413.52 ▼1.218.86 ▲7.1243.25 ▼0.87
Dashboard /wp-admin2,211 ▲335.75 ▲0.0391.85 ▼11.8941.75 ▼2.30
Posts /wp-admin/edit.php2,122 ▲222.18 ▲0.0438.60 ▲2.5535.63 ▲0.29
Add New Post /wp-admin/post-new.php1,532 ▼623.25 ▲5.08666.35 ▼3.8352.90 ▼13.91
Media Library /wp-admin/upload.php1,419 ▲194.34 ▲0.0395.86 ▼23.9744.38 ▼3.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jc-ajax-comment/jc-ajax-comment.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can look at the official readme.txt

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

"JC Ajax Comments" version 1.00's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
Posts comments and validates the comment form using Ajax

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 plugin132 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript126113
PHP16813
CSS1406

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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
Namespaces0
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%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/close.png0.95KB1.44KB0.00%
img/bg01.png0.91KB0.09KB▼ 89.56%