94% admin-edit-comment

Code Review | Admin Edit Comment

WordPress plugin Admin Edit Comment scored 94% from 54 tests.

About plugin

  • Plugin page: admin-edit-comment
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.1
  • WordPress version: 5.9.2
  • First release: Nov 28, 2018
  • Latest release: Oct 1, 2020
  • Number of updates: 12
  • Update frequency: every 56.2 days
  • Top authors: pressmaninc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 668 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Admin Edit Comment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0455.87 ▼0.78
Dashboard /wp-admin3.45 ▲0.0537.39 ▲1.97
Posts /wp-admin/edit.php3.69 ▲0.0540.05 ▼1.94
Add New Post /wp-admin/post-new.php6.92 ▼0.0595.48 ▼1,182.94
Media Library /wp-admin/upload.php3.33 ▲0.0453.01 ▲21.00
Admin Edit Comment /wp-admin/options-general.php?page=admin-edit-comment3.3023.33

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Admin Edit Comment: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲5616.22 ▲0.535.74 ▼0.672.78 ▲0.28
Dashboard /wp-admin2,897 ▲396.03 ▼0.14122.52 ▼9.06163.31 ▼17.19
Posts /wp-admin/edit.php2,706 ▲123.06 ▼0.1790.48 ▲26.11140.52 ▼8.17
Add New Post /wp-admin/post-new.php1,844 ▲15521.57 ▲0.94419.63 ▼32.31178.97 ▲19.85
Media Library /wp-admin/upload.php1,706 ▲115.49 ▼0.04139.19 ▼17.10186.92 ▼6.20
Admin Edit Comment /wp-admin/options-general.php?page=admin-edit-comment1,0562.3654.89183.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no 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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/admin-edit-comment/admin/admin.php:94

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: editor, wp10, admin, comment, pressman...

admin-edit-comment/admin-edit-comment.php Passed 13 tests

The main PHP script in "Admin Edit Comment" version 2.0.1 is automatically included on every request by WordPress
89 characters long description:
Adding an extra comment functionality in post screen exclusively for your editorial team.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin816 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP280163430
CSS1135189
JavaScript11721131
PO File1252766

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity27.50
▷ Minimum class complexity7.00
▷ Maximum class complexity48.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2793.10%
▷ Protected methods00.00%
▷ Private methods26.90%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.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