83% comment-controller

Code Review | Comment Controller

WordPress plugin Comment Controller scored 83% from 54 tests.

About plugin

  • Plugin page: comment-controller
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2014
  • Latest release: May 29, 2020
  • Number of updates: 25
  • Update frequency: every 82.1 days
  • Top authors: evertiro (56%)section214 (48%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.93ms] Passed 4 tests

Analyzing server-side resources used by Comment Controller
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.76 ▲1.35
Dashboard /wp-admin3.36 ▲0.0552.73 ▼3.14
Posts /wp-admin/edit.php3.47 ▲0.1153.68 ▲0.56
Add New Post /wp-admin/post-new.php5.94 ▲0.05101.44 ▼2.49
Media Library /wp-admin/upload.php3.28 ▲0.0538.81 ▲2.49
Comment Controller /wp-admin/options-general.php?page=comment_controller-settings3.2844.69

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
comment_controller_settings
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Comment Controller
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.68 ▲0.534.30 ▲2.3543.35 ▼2.73
Dashboard /wp-admin2,210 ▲75.90 ▲0.09107.77 ▼7.2742.63 ▼0.46
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0040.25 ▲4.9134.31 ▲2.59
Add New Post /wp-admin/post-new.php1,545 ▲2517.99 ▼5.22596.10 ▼10.4354.24 ▲2.44
Media Library /wp-admin/upload.php1,395 ▲74.23 ▼0.0095.09 ▼2.3846.48 ▲5.29
Comment Controller /wp-admin/options-general.php?page=comment_controller-settings1,0855.0496.9024.85

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

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

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/comment-controller/templates/comments.php

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 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: disable, comments, comment

comment-controller/class-comment-controller.php 77% from 13 tests

"Comment Controller" version 1.1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("comment-controller.php" instead of "class-comment-controller.php")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected10,773 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JSON1008,074
PHP101,0381,9792,443
CSS4161091
Markdown443090
JavaScript2181375

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity74.17
▷ Minimum class complexity10.00
▷ Maximum class complexity162.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods130
▷ Static methods10.77%
▷ Public methods11890.77%
▷ Protected methods21.54%
▷ Private methods107.69%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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