90% ai-ban-spam-comment

Code Review | AI Ban Spam Comment

WordPress plugin AI Ban Spam Comment scored90%from 54 tests.

About plugin

  • Plugin page: ai-ban-spam-comment
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2023
  • Latest release: Oct 7, 2023
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: naimgr83 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /15 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.25ms] Passed 4 tests

An overview of server-side resources used by AI Ban Spam Comment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.98 ▼2.51
Dashboard /wp-admin3.37 ▲0.0649.71 ▼3.35
Posts /wp-admin/edit.php3.42 ▲0.0646.22 ▼0.36
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.30 ▼9.57
Media Library /wp-admin/upload.php3.29 ▲0.0633.23 ▼1.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 14 new options
New WordPress options
abscai_api_key
abscai_top_p
widget_theysaidso_widget
abscai_presence_penalty
theysaidso_admin_options
db_upgraded
abscai_frequency_penalty
abscai_rejected_comment
can_compress_scripts
widget_recent-posts
...

Browser metrics Passed 4 tests

AI Ban Spam Comment: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6114.47 ▲0.301.75 ▼0.1944.06 ▼6.49
Dashboard /wp-admin2,227 ▲394.85 ▼1.04101.58 ▼14.6840.08 ▼3.09
Posts /wp-admin/edit.php2,107 ▲152.04 ▲0.0235.68 ▼3.6732.96 ▼3.35
Add New Post /wp-admin/post-new.php1,529 ▼917.37 ▼5.83680.41 ▲31.7265.34 ▲15.12
Media Library /wp-admin/upload.php1,400 ▲184.23 ▼0.0499.72 ▲0.5941.47 ▼2.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: ban spam comment, openai, chatgpt, gpt

ai-ban-spam-comment/ai_bsc.php 92% from 13 tests

"AI Ban Spam Comment" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ai-ban-spam-comment.php" instead of "ai_bsc.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
Success! There were no dangerous files found in this plugin240 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP227813224
CSS22016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin