78% user-spam-remover

Code Review | User Spam Remover

WordPress plugin User Spam Remover scored78%from 54 tests.

About plugin

  • Plugin page: user-spam-remover
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.5
  • WordPress version: 6.3.1
  • First release: Aug 27, 2010
  • Latest release: Aug 2, 2020
  • Number of updates: 46
  • Update frequency: every 78.9 days
  • Top authors: joelhardi (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

2,000+ active /47,752 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.83ms] Passed 4 tests

Analyzing server-side resources used by User Spam Remover
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.10 ▲1.81
Dashboard /wp-admin3.45 ▲0.1150.68 ▼11.56
Posts /wp-admin/edit.php3.57 ▲0.2147.02 ▼1.27
Add New Post /wp-admin/post-new.php6.03 ▲0.1592.26 ▼5.20
Media Library /wp-admin/upload.php3.38 ▲0.1535.21 ▼1.27
User Spam Remover /wp-admin/users.php?page=user_spam_remover3.4031.39

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for User Spam Remover
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.291.86 ▼0.0745.49 ▲1.75
Dashboard /wp-admin2,213 ▲225.92 ▲1.02101.61 ▲1.3342.46 ▼0.81
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0533.86 ▼4.2834.54 ▼0.63
Add New Post /wp-admin/post-new.php1,550 ▲1718.26 ▼4.72623.74 ▼13.1668.31 ▲17.26
Media Library /wp-admin/upload.php1,392 ▲44.18 ▲0.0298.88 ▼9.6544.82 ▼0.59
User Spam Remover /wp-admin/users.php?page=user_spam_remover1,0192.0621.8631.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/users.php?page=user_spam_remover
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/users.php?page=user_spam_remover
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
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 is_admin() in wp-content/plugins/user-spam-remover/user-spam-remover.php:969

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: users, user, admin, spam, registration

user-spam-remover/user-spam-remover.php 92% from 13 tests

The main PHP file in "User Spam Remover" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 293 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected696 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP197184696

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.33
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1443.75%
▷ Public methods1546.88%
▷ Protected methods1650.00%
▷ Private methods13.12%
Functions1
▷ Named functions1100.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 are no PNG files in this plugin