79% advanced-comment-control

Code Review | Advanced Comment Control

WordPress plugin Advanced Comment Control scored 79% from 54 tests.

About plugin

  • Plugin page: advanced-comment-...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.6
  • WordPress version: 5.9.2
  • First release: Sep 30, 2014
  • Latest release: May 23, 2016
  • Number of updates: 6
  • Update frequency: every 100.5 days
  • Top authors: layotte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,511 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 gracefully, with no errors

Server metrics [RAM: ▼2.23MB] [CPU: ▼365.70ms] Passed 4 tests

Analyzing server-side resources used by Advanced Comment Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.374.76 ▼51.15
Dashboard /wp-admin2.16 ▼1.254.08 ▼34.13
Posts /wp-admin/edit.php2.16 ▼1.488.59 ▼34.16
Add New Post /wp-admin/post-new.php2.16 ▼4.815.58 ▼1,343.34
Media Library /wp-admin/upload.php2.16 ▼1.143.91 ▼25.52
All Comments /wp-admin/edit-comments.php2.214.36
Advanced Controls /wp-admin/edit-comments.php?page=advanced_comment_control_settings2.218.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Comment Control
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲4915.30 ▼0.426.43 ▼0.202.33 ▼0.24
Dashboard /wp-admin2,896 ▲356.12 ▼0.05117.59 ▼16.54157.47 ▼4.93
Posts /wp-admin/edit.php2,713 ▲413.24 ▲0.0064.61 ▲1.31139.32 ▲2.55
Add New Post /wp-admin/post-new.php1,732 ▲7221.80 ▲5.91421.94 ▲3.78154.40 ▼2.12
Media Library /wp-admin/upload.php1,714 ▲135.53 ▲0.07142.76 ▲4.94196.77 ▲11.87
All Comments /wp-admin/edit-comments.php2,3963.4165.20139.64
Advanced Controls /wp-admin/edit-comments.php?page=advanced_comment_control_settings1,5042.4354.47187.60

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/advanced-comment-control/class.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedCommentControl has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=advanced_comment_control_settings
    • > Deprecated in wp-content/plugins/advanced-comment-control/class.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; AdvancedCommentControl has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× 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/advanced-comment-control/functions.php:98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-comment-control/advanced-comment-control.php:26

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: disable, comments, spam, trolls, trackbacks...

advanced-comment-control/advanced-comment-control.php Passed 13 tests

The principal PHP file in "Advanced Comment Control" v. 1.2.0 is loaded by WordPress automatically on each request
91 characters long description:
This plugin allows you to manage who can comment and when they can comment on your content.

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
Everything looks great! No dangerous files found in this plugin875 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3321139672
PO File14754122
JavaScript27250
CSS23031

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity105.00
▷ Minimum class complexity105.00
▷ Maximum class complexity105.00
Average method complexity10.45
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin