78% nerdtools-bad-bots-spam-reporter

Code Review | NerdTools Bad Bots Spam Reporter

WordPress plugin NerdTools Bad Bots Spam Reporter scored78%from 54 tests.

About plugin

  • Plugin page: nerdtools-bad-bot...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Aug 20, 2014
  • Number of updates: 11
  • Update frequency: every 2.6 days
  • Top authors: ko159 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by NerdTools Bad Bots Spam Reporter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0237.09 ▼6.53
Dashboard /wp-admin3.32 ▲0.0248.44 ▼0.23
Posts /wp-admin/edit.php3.37 ▲0.0247.02 ▼3.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.08 ▲0.60
Media Library /wp-admin/upload.php3.24 ▲0.0236.24 ▲0.19

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for NerdTools Bad Bots Spam Reporter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7813.35 ▼1.051.66 ▼0.0138.73 ▼8.25
Dashboard /wp-admin2,219 ▲274.85 ▼0.09110.56 ▼11.7842.39 ▼1.91
Posts /wp-admin/edit.php2,102 ▲132.01 ▲0.0439.51 ▲3.1536.62 ▲4.43
Add New Post /wp-admin/post-new.php1,559 ▲2618.49 ▼4.75594.44 ▼110.0459.03 ▲1.31
Media Library /wp-admin/upload.php1,392 ▲74.32 ▲0.1097.79 ▼4.2445.74 ▲1.24
NT BB Spam Reporter /wp-admin/nerdtools_bad_bots_spam_reporter.php260.440.0813.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nerdtools-bad-bots-spam-reporter/nerdtools_bad_bots_spam_reporter.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/nerdtools_bad_bots_spam_reporter.php
    • > Network (severe)
    wp-admin/nerdtools_bad_bots_spam_reporter.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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Not available as there is no user interface) image missing
The official readme.txt is a good inspiration

nerdtools-bad-bots-spam-reporter/nerdtools_bad_bots_spam_reporter.php 85% from 13 tests

"NerdTools Bad Bots Spam Reporter" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 251 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("nerdtools-bad-bots-spam-reporter.php" instead of "nerdtools_bad_bots_spam_reporter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171976

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
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
No PNG files were detected