84% wpsite-comment-moderator

Code Review | Comment Moderator

WordPress plugin Comment Moderator scored84%from 54 tests.

About plugin

  • Plugin page: wpsite-comment-mo...
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2014
  • Latest release: Aug 5, 2022
  • Number of updates: 25
  • Update frequency: every 119.0 days
  • Top authors: 99robots (64%)wpsitenet (36%)kjbenk (8%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,102 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
Installer ran successfully

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

An overview of server-side resources used by Comment Moderator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.38 ▼0.93
Dashboard /wp-admin3.32 ▲0.0246.38 ▼6.32
Posts /wp-admin/edit.php3.37 ▲0.0149.69 ▼0.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.11 ▼18.40
Media Library /wp-admin/upload.php3.24 ▲0.0135.57 ▼0.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Comment Moderator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.083.97 ▲2.3839.82 ▼7.48
Dashboard /wp-admin2,206 ▲185.86 ▼0.0396.47 ▼6.3335.97 ▼4.30
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0239.68 ▲3.6934.52 ▼0.46
Add New Post /wp-admin/post-new.php1,534 ▲2023.21 ▲5.50677.95 ▼21.8254.14 ▼0.45
Media Library /wp-admin/upload.php1,382 ▼34.18 ▼0.01119.39 ▲18.8143.19 ▼7.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • wpsite_comment_moderator_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wpsite-comment-moderator/wpsite-comment-moderator.php:19

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

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

wpsite-comment-moderator/wpsite-comment-moderator.php Passed 13 tests

The main file in "Comment Moderator" v. 1.3.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
Add a new user role, Comment Moderator, that allows a new user to only manage comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin71 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2235168
Markdown1103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected