10% act-stop-spam

Code Review | Act Stop Spam

WordPress plugin Act Stop Spam scored 10% from 54 tests.

About plugin

  • Plugin page: act-stop-spam
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4.2
  • WordPress version: 5.9.2
  • First release: Jul 28, 2015
  • Latest release: Sep 1, 2016
  • Number of updates: 4
  • Update frequency: every 100.8 days
  • Top authors: actmedia (75%)actsupport (50%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 1,541 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/act-stop-spam/act-stop-spam.php+291
    Use of undefined constant ACT_STOP_SPAM_KEY - assumed 'ACT_STOP_SPAM_KEY' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.04MB] [CPU: ▼300.24ms] Passed 4 tests

Server-side resources used by Act Stop Spam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1257.87 ▲8.03
Dashboard /wp-admin3.48 ▲0.0733.24 ▼2.08
Posts /wp-admin/edit.php3.70 ▲0.0638.19 ▼12.19
Add New Post /wp-admin/post-new.php6.95 ▼0.0395.45 ▼1,178.97
Media Library /wp-admin/upload.php3.36 ▲0.0524.03 ▼7.71
Act Stop Spam /wp-admin/options-general.php?page=act_stop_spam_settings_menu3.3023.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 1 new option
New tables
wp_act_stop_spam
New WordPress options
ACT_STOP_SPAM_KEY

Browser metrics Passed 4 tests

This is an overview of browser requirements for Act Stop Spam
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲6115.93 ▲0.185.53 ▼1.262.34 ▼0.12
Dashboard /wp-admin2,912 ▲516.02 ▼0.17119.58 ▼12.54156.06 ▼4.83
Posts /wp-admin/edit.php2,708 ▲143.23 ▼0.0064.08 ▼1.75138.91 ▼5.50
Add New Post /wp-admin/post-new.php1,794 ▲1317.32 ▼5.48422.91 ▼18.01157.62 ▼2.62
Media Library /wp-admin/upload.php1,712 ▲145.51 ▼0.01137.44 ▼8.57186.46 ▼6.05
Act Stop Spam /wp-admin/options-general.php?page=act_stop_spam_settings_menu2,3538.84154.59187.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=act_stop_spam_settings_menu
    • > Warning in wp-content/plugins/act-stop-spam/act-stop-spam.php+235
    Use of undefined constant ACT_STOP_SPAM_KEY - assumed 'ACT_STOP_SPAM_KEY' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 102× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/act-stop-spam/includes/class-act-table.php:12
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39
    • > PHP Notice
      Undefined variable: actstopspam_confidence in wp-content/plugins/act-stop-spam/act-stop-spam-options.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: stop forum spam, spam protection, stop, spam, wp protection...

act-stop-spam/act-stop-spam.php 92% from 13 tests

The primary PHP file in "Act Stop Spam" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 211 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin485 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP559207485

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity5.00
▷ Maximum class complexity27.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods39
▷ Static methods1128.21%
▷ Public methods3282.05%
▷ Protected methods00.00%
▷ Private methods717.95%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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