62% wp-ajax-edit-comments

Code Review | Mihdan: Ajax Edit Comments

WordPress plugin Mihdan: Ajax Edit Comments scored62%from 54 tests.

About plugin

  • Plugin page: wp-ajax-edit-comm...
  • Plugin version: 6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.3
  • WordPress version: 6.3.1
  • First release: May 20, 2007
  • Latest release: Jan 13, 2020
  • Number of updates: 537
  • Update frequency: every 8.7 days
  • Top authors: ronalfy (91.62%)Ajay (4.1%)mihdan (3.54%)joshben (1.3%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /322,038 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▼1.31MB] [CPU: ▼49.52ms] Passed 4 tests

This is a short check of server-side resources used by Mihdan: Ajax Edit Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.66 ▼0.808.74 ▼28.48
Dashboard /wp-admin2.72 ▼0.6311.08 ▼54.04
Posts /wp-admin/edit.php2.72 ▼0.6312.25 ▼35.06
Add New Post /wp-admin/post-new.php2.72 ▼3.1713.26 ▼80.50
Media Library /wp-admin/upload.php2.72 ▼0.5112.43 ▼19.18
Permissions /wp-admin/admin.php?page=aecpermissions2.7210.47
Cleanup /wp-admin/admin.php?page=aeccleanup2.7211.20
Appearance /wp-admin/admin.php?page=aecappearance2.7212.01
Behavior /wp-admin/admin.php?page=wpaec2.7213.30

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 159 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
WPAjaxEditComments20
db_upgraded
widget_theysaidso_widget
WPAjaxEditAuthoruser_options

Browser metrics Passed 4 tests

Mihdan: Ajax Edit Comments: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲27013.49 ▼0.831.63 ▼0.0632.84 ▼9.64
Dashboard /wp-admin2,358 ▲1734.98 ▼0.91103.18 ▲0.6247.09 ▲7.26
Posts /wp-admin/edit.php2,133 ▲472.05 ▲0.0539.28 ▲3.2035.68 ▲0.29
Add New Post /wp-admin/post-new.php1,571 ▲4318.13 ▼0.12620.47 ▼9.0555.67 ▼4.75
Media Library /wp-admin/upload.php1,426 ▲384.25 ▲0.0697.13 ▼12.0940.91 ▼6.66
Permissions /wp-admin/admin.php?page=aecpermissions9771.8626.6724.43
Cleanup /wp-admin/admin.php?page=aeccleanup8721.8625.5126.18
Appearance /wp-admin/admin.php?page=aecappearance1,7642.9777.4847.78
Behavior /wp-admin/admin.php?page=wpaec1,5371.8726.8728.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-ajax-edit-comments/lib/class.css.php+113
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaec
    • > Deprecated in wp-content/plugins/wp-ajax-edit-comments/lib/class.css.php+113
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaec
    • > Deprecated in wp-content/plugins/wp-ajax-edit-comments/lib/class.utility.php+123
    Array and string offset access syntax with curly braces is deprecated

SRP 0% 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
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-ajax-edit-comments/views/move-comment.php
    • > /wp-content/plugins/wp-ajax-edit-comments/views/comment-popup.php
    • > /wp-content/plugins/wp-ajax-edit-comments/views/blacklist-comment.php
    • > /wp-content/plugins/wp-ajax-edit-comments/views/comment-editor.php
    • > /wp-content/plugins/wp-ajax-edit-comments/views/email.php
    • > /wp-content/plugins/wp-ajax-edit-comments/views/request-deletion.php
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/appearance.php:3
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 177
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 161
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 113
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 133
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 129
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 165
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 173
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-ajax-edit-comments/views/admin-panel/admin-panel.php on line 153

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-ajax-edit-comments/wp-ajax-edit-comments.php 85% from 13 tests

The main PHP file in "Mihdan: Ajax Edit Comments" ver. 6.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin18,231 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PO File154,6118,0829,881
PHP245135485,161
JavaScript233405002,927
CSS63931262

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 125)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity61.73
▷ Minimum class complexity3.00
▷ Maximum class complexity215.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity125.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods144
▷ Static methods11781.25%
▷ Public methods14197.92%
▷ Protected methods00.00%
▷ Private methods32.08%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 PNG files occupy 0.08MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/facebook.png0.73KB0.98KB0.00%
images/themes/pictos-dark-small/sprite.png2.22KB2.47KB0.00%
images/feed.png0.67KB0.90KB0.00%
css/atd/images/editing.png1.21KB1.17KB▼ 3.31%
images/pluginbuddy.png3.28KB0.71KB▼ 78.24%