78% anti-spam

Code Review | Titan Anti-spam & Security

WordPress plugin Titan Anti-spam & Security scored78%from 54 tests.

About plugin

  • Plugin page: anti-spam
  • Plugin version: 7.3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2012
  • Latest release: Mar 24, 2023
  • Number of updates: 131
  • Update frequency: every 29.5 days
  • Top authors: webvitaly (66.41%)alexkovalevv (16.79%)webtemyk (12.21%)creativemotion (6.87%)

Code review

54 tests

User reviews

364 reviews

Install metrics

100,000+ active /3,250,914 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: ▲3.27MB] [CPU: ▲17.81ms] Passed 4 tests

Analyzing server-side resources used by Titan Anti-spam & Security
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5148.72 ▲10.47
Dashboard /wp-admin7.21 ▲3.8770.63 ▲7.07
Posts /wp-admin/edit.php7.26 ▲3.9173.97 ▲29.32
Add New Post /wp-admin/post-new.php9.76 ▲3.87121.50 ▲24.36
Media Library /wp-admin/upload.php7.07 ▲3.8464.71 ▲29.64

Server storage [IO: ▲7.01MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 641 new files
Database: no new tables, 22 new options
New WordPress options
widget_theysaidso_widget
titan_bruteforce_set_default_options
can_compress_scripts
titan_bruteforce_allowed_retries
titan_bruteforce_lockouts
titan_bruteforce_whitelist_usernames
titan_bruteforce_blacklist_ips
titan_last_check_update_time
titan_bruteforce_valid_duration
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Titan Anti-spam & Security
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,782 ▼96410.61 ▼2.561.66 ▲0.1232.18 ▼5.14
Dashboard /wp-admin2,509 ▲3295.76 ▲0.1693.52 ▼4.0846.60 ▲2.32
Posts /wp-admin/edit.php2,412 ▲3122.14 ▲0.1548.10 ▲14.5037.58 ▲3.91
Add New Post /wp-admin/post-new.php1,821 ▲29518.19 ▼4.99623.44 ▼66.5450.99 ▼5.85
Media Library /wp-admin/upload.php1,689 ▲2894.22 ▲0.02101.99 ▲2.7843.66 ▼0.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 22 options in the database
    • titan_bruteforce_whitelist_usernames
    • titan_bruteforce_blacklist_ips
    • titan_bruteforce_lockouts_total
    • titan_bruteforce_valid_duration
    • titan_bruteforce_allowed_retries
    • titan_bruteforce_minutes_lockout
    • titan_plugin_version
    • widget_recent-posts
    • titan_bruteforce_lockouts
    • titan_bruteforce_gdpr
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/anti-spam/includes/vulnerabilities/views/themes-table.php
    • > /wp-content/plugins/anti-spam/includes/check/views/check.php
    • > /wp-content/plugins/anti-spam/includes/vulnerabilities/views/plugins-table.php
    • > /wp-content/plugins/anti-spam/includes/vulnerabilities/views/vulnerabilities.php
    • > /wp-content/plugins/anti-spam/includes/vulnerabilities/views/wordpress-table.php
  • 94× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/anti-spam/views/pro-version.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Titan\\Client\\Loader' not found in wp-content/plugins/anti-spam/libs/api-client/entity/class.security.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_116\\Pages\\Step_Custom' not found in wp-content/plugins/anti-spam/admin/pages/setup/steps/class-step-security-audit.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Titan\\Page\\Base' not found in wp-content/plugins/anti-spam/admin/pages/class-page-backup.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Titan\\Client\\Loader' not found in wp-content/plugins/anti-spam/libs/api-client/response/class.error.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'ITSEC_Zxcvbn_Match' not found in wp-content/plugins/anti-spam/includes/tweaks/password-requirements/libs/zxcvbn-php/matchers/bruteforce.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/anti-spam/views/quickstart.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Titan\\Client\\Loader' not found in wp-content/plugins/anti-spam/libs/api-client/entity/class.checkEmail.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'ITSEC_Zxcvbn_Match' not found in wp-content/plugins/anti-spam/includes/tweaks/password-requirements/libs/zxcvbn-php/matchers/spatial.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Titan\\Client\\Loader' not found in wp-content/plugins/anti-spam/libs/api-client/entity/class.outdated.php:14

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #5 (Site Checker), #6 (Tweaks), #7 (Error Log), #8 (License)
You can take inspiration from this readme.txt

anti-spam/anti-spam.php 92% from 13 tests

"Titan Anti-spam & Security" version 7.3.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin169,362 lines of code in 538 files:
LanguageFilesBlank linesComment linesLines of code
JSON80097,513
PHP2896,98914,52925,885
JavaScript1143,3982,71424,141
CSS1002,45059216,704
LESS166021162,960
PO File77149012,081
Markdown324072
SVG1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.55
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces28
Interfaces2
Traits1
Classes222
▷ Abstract classes229.91%
▷ Concrete classes20090.09%
▷ Final classes42.00%
Methods1,474
▷ Static methods1409.50%
▷ Public methods1,20581.75%
▷ Protected methods19313.09%
▷ Private methods765.16%
Functions81
▷ Named functions5567.90%
▷ Anonymous functions2632.10%
Constants127
▷ Global constants6148.03%
▷ Class constants6651.97%
▷ Public constants66100.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
27 PNG files occupy 0.22MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/icon.png1.79KB1.71KB▼ 4.10%
libs/factory/bootstrap/assets/images/chosen-sprite.png0.63KB0.88KB0.00%
includes/check/assets/img/ok.png1.28KB0.88KB▼ 31.55%
includes/check/assets/img/warning.png0.89KB0.71KB▼ 19.65%
includes/check/assets/img/error.png0.81KB0.51KB▼ 36.93%