84% sz-comment-filter

Code Review | Sz Comment Filter

WordPress plugin Sz Comment Filter scored84%from 54 tests.

About plugin

  • Plugin page: sz-comment-filter
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2015
  • Latest release: Mar 26, 2015
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: SzMake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /993 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.78ms] Passed 4 tests

Server-side resources used by Sz Comment Filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.48 ▼4.83
Dashboard /wp-admin3.38 ▲0.0745.80 ▼5.28
Posts /wp-admin/edit.php3.43 ▲0.0750.70 ▲3.80
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.94 ▼12.34
Media Library /wp-admin/upload.php3.30 ▲0.0739.50 ▲3.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sz Comment Filter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲3213.27 ▼1.091.58 ▼0.5944.97 ▲1.21
Dashboard /wp-admin2,206 ▲184.82 ▼1.04109.76 ▼6.2239.01 ▼6.21
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0338.53 ▲2.3934.49 ▼0.13
Add New Post /wp-admin/post-new.php1,445 ▼8820.09 ▼2.98478.30 ▼218.3736.37 ▼23.10
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.00100.01 ▼7.9843.63 ▼4.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sz-comment-filter/szmcf-admin.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/sz-comment-filter/sz-comment-filter.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
10 plugin tags: comments, spammer, comment, block-spam, bot...

sz-comment-filter/sz-comment-filter.php 92% from 13 tests

"Sz Comment Filter" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,479 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4135258959
PHP39551407
PO File1212258
CSS16055

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/blkfrogman.png10.86KB4.64KB▼ 57.25%