90% comment-limiter

Code Review | Comment Limiter

WordPress plugin Comment Limiter scored90%from 54 tests.

About plugin

  • Plugin page: comment-limiter
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Nov 16, 2019
  • Number of updates: 17
  • Update frequency: every 54.9 days
  • Top authors: ranss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,000 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.92ms] Passed 4 tests

A check of server-side resources used by Comment Limiter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.19 ▼2.41
Dashboard /wp-admin3.33 ▲0.0351.71 ▲4.95
Posts /wp-admin/edit.php3.44 ▲0.0949.09 ▲9.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.38 ▼14.08
Media Library /wp-admin/upload.php3.25 ▲0.0335.66 ▲3.86
All Comments /wp-admin/edit-comments.php3.2741.80
Comment Limiter /wp-admin/edit-comments.php?page=comment-limiter3.2231.62

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Comment Limiter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.67 ▼1.141.69 ▼0.1239.86 ▼3.54
Dashboard /wp-admin2,217 ▲325.82 ▼0.06107.97 ▼6.5739.60 ▼7.27
Posts /wp-admin/edit.php2,106 ▲142.00 ▲0.0140.02 ▼0.4535.40 ▼1.59
Add New Post /wp-admin/post-new.php1,548 ▲523.07 ▲4.79617.09 ▼34.9269.84 ▼2.34
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.0699.97 ▼4.4842.08 ▼0.26
All Comments /wp-admin/edit-comments.php1,8122.3036.1834.46
Comment Limiter /wp-admin/edit-comments.php?page=comment-limiter8982.0522.2325.80

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: length, minimum comment, maximum, comment characters, limit...

comment-limiter/comment-limiter.php Passed 13 tests

This is the main PHP file of "Comment Limiter" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
A simple plugin that limit the maximum and minimum of characters allowed in a post comment

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected404 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7115265352
Markdown113031
CSS15021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.25
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected