84% spam-to-blacklist

Code Review | Spam to blacklist

WordPress plugin Spam to blacklist scored84%from 54 tests.

About plugin

  • Plugin page: spam-to-blacklist
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 6.3.1
  • First release: May 18, 2018
  • Latest release: May 18, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: proninyaroslav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 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.00MB] [CPU: ▼8.05ms] Passed 4 tests

Analyzing server-side resources used by Spam to blacklist
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.37 ▼7.80
Dashboard /wp-admin3.31 ▼0.0343.15 ▼17.87
Posts /wp-admin/edit.php3.36 ▲0.0146.96 ▲3.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.35 ▼8.98
Media Library /wp-admin/upload.php3.23 ▲0.0136.14 ▲2.47

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Spam to blacklist: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.27 ▼1.342.24 ▲0.5444.94 ▲6.21
Dashboard /wp-admin2,206 ▲154.86 ▼0.0297.76 ▼12.5239.75 ▼3.38
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0441.12 ▲6.4435.56 ▼1.53
Add New Post /wp-admin/post-new.php1,533 ▲1423.09 ▼0.16663.46 ▼10.6451.28 ▼3.80
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.05109.14 ▲11.0047.95 ▲2.58

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 add_action() in wp-content/plugins/spam-to-blacklist/spam-to-blacklist.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: blacklist, comments, ip, ban, spam

spam-to-blacklist/spam-to-blacklist.php Passed 13 tests

"Spam to blacklist" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
132 characters long description:
Adds IP from comment that marked as spam to standard WordPress blacklist. Comments already marked as spam are not added to the list.

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
There were no executable files found in this plugin15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP143315

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.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