78% nerdtools-comment-filter

Code Review | NerdTools Comment Filter

WordPress plugin NerdTools Comment Filter scored78%from 54 tests.

About plugin

  • Plugin page: nerdtools-comment...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Aug 12, 2014
  • Latest release: Aug 23, 2014
  • Number of updates: 4
  • Update frequency: every 3.0 days
  • Top authors: ko159 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 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.01MB] [CPU: ▼8.08ms] Passed 4 tests

This is a short check of server-side resources used by NerdTools Comment Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.53 ▼2.76
Dashboard /wp-admin3.31 ▲0.0145.28 ▼6.45
Posts /wp-admin/edit.php3.36 ▲0.0143.76 ▼6.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.26 ▼16.69
Media Library /wp-admin/upload.php3.23 ▲0.0134.21 ▲2.18

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for NerdTools Comment Filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.29 ▼1.501.68 ▼0.1841.47 ▼7.74
Dashboard /wp-admin2,216 ▲245.83 ▲0.9099.43 ▼13.9940.81 ▼4.34
Posts /wp-admin/edit.php2,102 ▲132.04 ▼0.0035.03 ▲0.1931.77 ▼3.74
Add New Post /wp-admin/post-new.php1,545 ▲2623.06 ▼0.23681.79 ▲101.6257.10 ▲6.48
Media Library /wp-admin/upload.php1,401 ▲164.31 ▲0.1399.23 ▲3.2143.91 ▲3.29
NT Comment Filter /wp-admin/nerdtools_comment_filter.php260.440.0913.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nerdtools-comment-filter/nerdtools_comment_filter.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/nerdtools_comment_filter.php
    • > Network (severe)
    wp-admin/nerdtools_comment_filter.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Not available as no user interface) image not found
The official readme.txt is a good inspiration

nerdtools-comment-filter/nerdtools_comment_filter.php 85% from 13 tests

The entry point to "NerdTools Comment Filter" version 1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nerdtools-comment-filter.php" instead of "nerdtools_comment_filter.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 248 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected72 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192172

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.24
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin