84% comment-moderation-highlights

Code Review | Comment Moderation Highlights

WordPress plugin Comment Moderation Highlights scored 84% from 54 tests.

About plugin

  • Plugin page: comment-moderatio...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.2
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Apr 3, 2023
  • Number of updates: 21
  • Update frequency: every 143.7 days
  • Top authors: forlogos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 816 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Comment Moderation Highlights
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.63 ▼11.87
Dashboard /wp-admin3.32 ▲0.0149.47 ▲0.28
Posts /wp-admin/edit.php3.37 ▲0.0149.17 ▲1.08
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.59 ▲1.37
Media Library /wp-admin/upload.php3.24 ▲0.0137.36 ▲1.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
flgs_cmh

Browser metrics Passed 4 tests

Checking browser requirements for Comment Moderation Highlights
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.60 ▼1.061.49 ▼0.9238.23 ▼6.04
Dashboard /wp-admin2,205 ▲175.84 ▼0.03100.89 ▼4.8840.14 ▼1.54
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0340.45 ▲6.1635.22 ▲0.96
Add New Post /wp-admin/post-new.php1,545 ▲1718.55 ▲0.45647.71 ▲48.6354.08 ▼3.35
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.04100.93 ▼1.4444.25 ▲0.34

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comment-moderation-highlights/comment_moderation_highlights.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
2 plugin tags: comments, moderation

comment-moderation-highlights/comment_moderation_highlights.php 92% from 13 tests

The entry point to "Comment Moderation Highlights" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("comment-moderation-highlights.php" instead of "comment_moderation_highlights.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,381 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13151891,751
CSS14128438
PHP15168173
Markdown117019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin