84% auto-comment-moderation

Code Review | Auto Comment Moderation

WordPress plugin Auto Comment Moderation scored84%from 54 tests.

About plugin

  • Plugin page: auto-comment-mode...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2022
  • Latest release: Sep 21, 2022
  • Number of updates: 7
  • Update frequency: every 28.1 days
  • Top authors: moderatehatespeech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Auto Comment Moderation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.73 ▼0.88
Dashboard /wp-admin3.33 ▲0.0343.76 ▼3.27
Posts /wp-admin/edit.php3.38 ▲0.0343.61 ▼1.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.37 ▼9.17
Media Library /wp-admin/upload.php3.26 ▲0.0336.20 ▼1.29

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
modhs_settings
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Auto Comment Moderation: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.72 ▲0.371.88 ▲0.2940.35 ▼6.01
Dashboard /wp-admin2,208 ▲315.51 ▼0.0687.99 ▼7.7139.66 ▼0.72
Posts /wp-admin/edit.php2,116 ▲191.98 ▼0.0536.92 ▼0.1334.30 ▼2.54
Add New Post /wp-admin/post-new.php1,539 ▲1323.42 ▲0.27649.91 ▼37.2152.25 ▼16.27
Media Library /wp-admin/upload.php1,416 ▲194.23 ▲0.0395.32 ▼17.8040.81 ▼6.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • modhs_settings
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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)
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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-comment-moderation/admin/auto-comment-moderation-admin.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === auto-comment-moderation === )
You can take inspiration from this readme.txt

auto-comment-moderation/auto-comment-moderation.php 92% from 13 tests

This is the main PHP file of "Auto Comment Moderation" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin121 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33078121

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin