90% spam-ip-export

Code Review | Block Spam Comment

WordPress plugin Block Spam Comment scored90%from 54 tests.

About plugin

  • Plugin page: spam-ip-export
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Feb 4, 2022
  • Latest release: Feb 10, 2022
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: iwebelab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /303 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.63ms] Passed 4 tests

This is a short check of server-side resources used by Block Spam Comment
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.81 ▲2.66
Dashboard /wp-admin3.31 ▲0.0146.26 ▼3.27
Posts /wp-admin/edit.php3.36 ▲0.0148.92 ▲1.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.58 ▼11.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.30 ▼0.67
Block Spam Comments /wp-admin/tools.php?page=block-spam-comments3.2029.66

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Block Spam Comment
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.221.57 ▼0.1541.04 ▼0.91
Dashboard /wp-admin2,207 ▲195.83 ▲0.96100.44 ▼5.8339.36 ▼4.56
Posts /wp-admin/edit.php2,096 ▲42.01 ▲0.0138.79 ▼3.2933.98 ▼2.47
Add New Post /wp-admin/post-new.php1,536 ▲1323.05 ▼0.11671.91 ▲5.4655.32 ▼2.70
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.02105.17 ▲6.2445.84 ▲1.78
Block Spam Comments /wp-admin/tools.php?page=block-spam-comments7702.0224.5229.92

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: comments, hosting, iweblab, block, spam

spam-ip-export/block-spam-comment-iweblab.php 92% from 13 tests

The main PHP file in "Block Spam Comment" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("spam-ip-export.php" instead of "block-spam-comment-iweblab.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected88 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3172188

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin