84% comment-moderation-highlighter

Code Review | Comment Moderation Highlighter

WordPress plugin Comment Moderation Highlighter scored84%from 54 tests.

About plugin

  • Plugin page: comment-moderatio...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 6, 2014
  • Latest release: Sep 4, 2016
  • Number of updates: 14
  • Update frequency: every 52.2 days
  • Top authors: johnh10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,142 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.32ms] Passed 4 tests

This is a short check of server-side resources used by Comment Moderation Highlighter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.75 ▼0.59
Dashboard /wp-admin3.34 ▲0.0348.17 ▼4.00
Posts /wp-admin/edit.php3.39 ▲0.0348.71 ▼2.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.72 ▼28.85
Media Library /wp-admin/upload.php3.26 ▲0.0335.53 ▼1.42
Comment Highlighter /wp-admin/options-general.php?page=comment-moderation-highlighter3.2331.38

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
cmh_highlight_keywords
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Comment Moderation Highlighter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.17 ▼1.211.76 ▲0.1145.22 ▲5.50
Dashboard /wp-admin2,210 ▲224.87 ▼0.0196.68 ▼11.7840.32 ▼1.83
Posts /wp-admin/edit.php2,090 ▼21.99 ▼0.0034.55 ▼6.2131.57 ▼7.13
Add New Post /wp-admin/post-new.php1,517 ▼2017.77 ▼0.23674.94 ▲52.1651.76 ▼0.42
Media Library /wp-admin/upload.php1,392 ▲14.26 ▲0.0494.89 ▼11.9042.17 ▼2.91
Comment Highlighter /wp-admin/options-general.php?page=comment-moderation-highlighter8212.1724.4036.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/comment-moderation-highlighter/comment-moderation-highlighter.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: comments, troll, highlighter, comment, spam...

comment-moderation-highlighter/comment-moderation-highlighter.php Passed 13 tests

The principal PHP file in "Comment Moderation Highlighter" v. 0.2 is loaded by WordPress automatically on each request
97 characters long description:
Highlights key phrases in comments during moderation to better spot manual spam or troll remarks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected155 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23620131
CSS12024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin