79% short-comment-filter

Code Review | Short Comment Filter

WordPress plugin Short Comment Filter scored79%from 54 tests.

About plugin

  • Plugin page: short-comment-filter
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.0
  • WordPress version: 6.3.1
  • First release: Apr 8, 2013
  • Latest release: Oct 6, 2014
  • Number of updates: 11
  • Update frequency: every 49.6 days
  • Top authors: itsananderson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /984 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▲1.02ms] Passed 4 tests

Analyzing server-side resources used by Short Comment Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.97 ▲7.21
Dashboard /wp-admin3.34 ▲0.0446.91 ▼3.51
Posts /wp-admin/edit.php3.45 ▲0.1047.21 ▼0.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.58 ▲4.49
Media Library /wp-admin/upload.php3.26 ▲0.0437.73 ▲3.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Short Comment Filter: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.61 ▼0.941.90 ▲0.0539.92 ▼1.42
Dashboard /wp-admin2,210 ▲254.84 ▼0.03107.03 ▲7.0739.92 ▼3.64
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0039.79 ▼0.2535.18 ▼2.26
Add New Post /wp-admin/post-new.php1,545 ▲318.01 ▼0.22621.00 ▲16.3352.48 ▲2.47
Media Library /wp-admin/upload.php1,395 ▲44.33 ▲0.1296.01 ▼2.8746.10 ▲4.20
Short Comment Filter /wp-admin/short-comment-filter-settings.php260.440.1114.24

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Short_Comment_Filter_Settings' not found in wp-content/plugins/short-comment-filter/views/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/short-comment-filter/short-comment-filter.php:112

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/short-comment-filter-settings.php
    • > Network (severe)
    wp-admin/short-comment-filter-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
No plugin tags provided

short-comment-filter/short-comment-filter.php Passed 13 tests

The entry point to "Short Comment Filter" version 2.2 is a PHP file that has certain tags in its header comment area
87 characters long description:
Automatically Spams or Deletes comments that don't meet a specified length requirement.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin253 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33488201
JavaScript11326
Markdown18026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods25100.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin