88% wp-stop-forum-spam

Code Review | WP Stop Forum Spam

WordPress plugin WP Stop Forum Spam scored 88% from 54 tests.

About plugin

  • Plugin page: wp-stop-forum-spam
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 5.9.2
  • First release: Mar 17, 2013
  • Latest release: Mar 17, 2013
  • Number of updates: 15
  • Update frequency: N/A
  • Top authors: DarkWolf (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,559 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼4.75ms] Passed 4 tests

This is a short check of server-side resources used by WP Stop Forum Spam
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.03323.90 ▲274.61
Dashboard /wp-admin3.44 ▲0.03344.65 ▲311.36
Posts /wp-admin/edit.php3.67 ▲0.03350.39 ▲303.36
Add New Post /wp-admin/post-new.php6.91 ▼0.07387.12 ▼880.74
Media Library /wp-admin/upload.php3.32 ▲0.02307.07 ▲283.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Stop Forum Spam
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7316.01 ▲0.006.52 ▲0.493.10 ▲0.62
Dashboard /wp-admin2,895 ▲346.14 ▼0.02117.20 ▼18.16156.74 ▼9.19
Posts /wp-admin/edit.php2,688 ▼33.23 ▼0.0161.94 ▼13.18134.70 ▼152.19
Add New Post /wp-admin/post-new.php1,927 ▲26619.06 ▼3.16435.34 ▲24.96148.91 ▼9.64
Media Library /wp-admin/upload.php1,698 ▲35.55 ▲0.03144.91 ▼7.52188.60 ▼4.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php:40
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php on line 18
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php on line 19
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php on line 19
    • > PHP Warning
      include_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php on line 18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php on line 18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-stop-forum-spam/stop_forum_spam.php on line 19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: bbpress, antispam, darkwolf, stop, wp stop forum spam...

wp-stop-forum-spam/stop_forum_spam.php 92% from 13 tests

The principal PHP file in "WP Stop Forum Spam" v. 0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-stop-forum-spam.php" instead of "stop_forum_spam.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin112 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11627112
HTML1010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions7
▷ Named functions7100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sps_ico.png0.54KB0.69KB0.00%