84% limit-comments-and-word-count

Code Review | Limit Comments and Word Count

WordPress plugin Limit Comments and Word Count scored84%from 54 tests.

About plugin

  • Plugin page: limit-comments-an...
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.4.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.0
  • WordPress version: 6.3.1
  • First release: Jul 4, 2018
  • Latest release: Aug 28, 2023
  • Number of updates: 45
  • Update frequency: every 41.8 days
  • Top authors: artiosmedia (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

50+ active /3,063 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
Installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼16.57ms] Passed 4 tests

Analyzing server-side resources used by Limit Comments and Word Count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.17 ▼0.66
Dashboard /wp-admin3.19 ▼0.1229.51 ▼23.80
Posts /wp-admin/edit.php3.26 ▼0.1035.82 ▼13.06
Add New Post /wp-admin/post-new.php5.50 ▼0.3874.62 ▼22.74
Media Library /wp-admin/upload.php3.22 ▼0.0127.14 ▼6.68
Comment-Word Limit /wp-admin/options-general.php?page=lpwc_settings_page3.3341.42

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
lpwc_comment_rules
lpwc_show_comment_rules
lpwc_version
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Limit Comments and Word Count: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.451.68 ▼0.0339.94 ▼6.08
Dashboard /wp-admin2,196 ▲165.60 ▼0.0289.50 ▼2.1341.09 ▲2.58
Posts /wp-admin/edit.php2,113 ▲102.05 ▲0.0736.20 ▼4.2835.41 ▲0.73
Add New Post /wp-admin/post-new.php6,229 ▲4,70326.00 ▲2.83879.40 ▲213.8451.92 ▲0.64
Media Library /wp-admin/upload.php1,410 ▲104.23 ▲0.02104.52 ▼3.8645.13 ▼3.44
Comment-Word Limit /wp-admin/options-general.php?page=lpwc_settings_page2,0766.73149.3979.40

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/limit-comments-and-word-count/limit-comments-and-word-count.php:27

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: user comment limit, comments per user, comment limits, comment word limit, subscriber word limit...

limit-comments-and-word-count/limit-comments-and-word-count.php 92% from 13 tests

The main PHP script in "Limit Comments and Word Count" version 1.1.8 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 214 characters long)

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 detected3,262 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP21782471,152
PO File53974241,105
JavaScript386251703
CSS35526302

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity161.00
▷ Minimum class complexity161.00
▷ Maximum class complexity161.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods5171.83%
▷ Protected methods00.00%
▷ Private methods2028.17%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants5
▷ Global constants5100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/edit-icon-30x30.png1.42KB1.22KB▼ 13.94%
images/x.png1.04KB1.25KB0.00%
images/trash-icon-30x30.png1.23KB1.22KB▼ 0.79%