83% kama-spamblock

Code Review | Kama SpamBlock

WordPress plugin Kama SpamBlock scored83%from 54 tests.

About plugin

  • Plugin page: kama-spamblock
  • Plugin version: 1.8.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2014
  • Latest release: Nov 22, 2023
  • Number of updates: 45
  • Update frequency: every 73.4 days
  • Top authors: Tkama (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

7,000+ active /49,436 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.03MB] [CPU: ▼2.90ms] Passed 4 tests

This is a short check of server-side resources used by Kama SpamBlock
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.06 ▼0.68
Dashboard /wp-admin3.35 ▲0.0046.78 ▼17.99
Posts /wp-admin/edit.php3.47 ▲0.1047.52 ▲1.91
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.49 ▲5.16
Media Library /wp-admin/upload.php3.27 ▲0.0437.80 ▲7.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Kama SpamBlock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.22 ▼0.141.69 ▲0.0642.70 ▼0.74
Dashboard /wp-admin2,198 ▲175.61 ▼0.1193.49 ▼12.6842.89 ▼2.64
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0238.89 ▼0.1736.96 ▲0.98
Add New Post /wp-admin/post-new.php1,526 ▼423.17 ▲0.21594.57 ▼6.8353.06 ▼0.68
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.0398.46 ▼8.2340.87 ▼5.31

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kama-spamblock/kama-spamblock.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === kama-spamblock === )
The official readme.txt might help

kama-spamblock/kama-spamblock.php 92% from 13 tests

The main PHP file in "Kama SpamBlock" ver. 1.8.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin188 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47560188

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 files were detected