84% advanced-comments-moderation

Code Review | Advanced Comments Moderation

WordPress plugin Advanced Comments Moderation scored84%from 54 tests.

About plugin

  • Plugin page: advanced-comments...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2013
  • Latest release: Jan 30, 2014
  • Number of updates: 12
  • Update frequency: every 8.7 days
  • Top authors: titopandub (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,205 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼8.22ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Comments Moderation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.21 ▼5.28
Dashboard /wp-admin3.45 ▲0.1148.17 ▼20.17
Posts /wp-admin/edit.php3.57 ▲0.2148.38 ▼2.03
Add New Post /wp-admin/post-new.php6.03 ▲0.1593.99 ▼5.39
Media Library /wp-admin/upload.php3.38 ▲0.1538.98 ▲4.20
All Comments /wp-admin/edit-comments.php3.4643.48

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
acm_options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Comments Moderation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.25 ▲0.011.96 ▲0.3442.42 ▼1.73
Dashboard /wp-admin2,209 ▲355.51 ▼0.0684.23 ▼4.6041.38 ▼3.52
Posts /wp-admin/edit.php2,120 ▲172.09 ▲0.0739.26 ▼5.5236.33 ▼1.48
Add New Post /wp-admin/post-new.php1,555 ▲2923.26 ▲0.26612.52 ▼81.1651.51 ▼4.04
Media Library /wp-admin/upload.php1,417 ▲144.20 ▲0.0998.71 ▼6.8445.06 ▼1.73
All Comments /wp-admin/edit-comments.php1,8452.3040.0433.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • acm_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please 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 add_action() in wp-content/plugins/advanced-comments-moderation/advanced-comments-moderation.php:833

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: comments

advanced-comments-moderation/advanced-comments-moderation.php Passed 13 tests

The main PHP script in "Advanced Comments Moderation" version 1.4 is automatically included on every request by WordPress
86 characters long description:
Advanced Comments Moderation makes managing your WordPress blog's comments far easier.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected821 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1242259746
JavaScript11044
PO File14425
CSS1106

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity35.00
▷ Minimum class complexity18.00
▷ Maximum class complexity52.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3375.00%
▷ Protected methods00.00%
▷ Private methods1125.00%
Functions11
▷ Named functions11100.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