83% wt-security

Code Review | WebTotem Security

WordPress plugin WebTotem Security scored83%from 54 tests.

About plugin

  • Plugin page: wt-security
  • Plugin version: 2.4.21
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 167
  • Update frequency: every 8.3 days
  • Top authors: wtsec (99.4%)wtcreator2 (1.2%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /66,154 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 gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▲12.27ms] Passed 4 tests

This is a short check of server-side resources used by WebTotem Security
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1056.02 ▲13.31
Dashboard /wp-admin3.45 ▲0.1594.45 ▲46.17
Posts /wp-admin/edit.php3.49 ▲0.1462.82 ▲16.58
Add New Post /wp-admin/post-new.php5.96 ▲0.0896.01 ▲8.46
Media Library /wp-admin/upload.php3.30 ▲0.0746.38 ▲10.71
Activation /wp-admin/admin.php?page=wtotem_activation4.0091.85
WebTotem /wp-admin/admin.php?page=wtotem2.9838.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 391 new files
Database: 5 new tables, 6 new options
New tables
wp_wtotem_scan_logs
wp_wtotem_audit_logs
wp_wtotem_settings
wp_wtotem_confidential_files
wp_wtotem_blocked_list
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WebTotem Security
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲11613.21 ▼1.111.87 ▼0.1045.93 ▲1.75
Dashboard /wp-admin2,229 ▲415.80 ▲0.95101.62 ▼3.9171.26 ▲25.82
Posts /wp-admin/edit.php2,115 ▲261.98 ▼0.0138.10 ▲0.8135.33 ▲0.33
Add New Post /wp-admin/post-new.php1,536 ▲317.66 ▼5.69691.80 ▲4.9159.32 ▲7.64
Media Library /wp-admin/upload.php1,408 ▲204.23 ▲0.0898.28 ▼8.2463.54 ▲18.92
Activation /wp-admin/admin.php?page=wtotem_activation1,0723.5260.9658.83
WebTotem /wp-admin/admin.php?page=wtotem1,0663.3957.2361.14

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 141× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Extension/EscaperExtension.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\Loader\\LoaderInterface' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Loader/FilesystemLoader.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Unary\\AbstractUnary' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Node/WithNode.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Extension/DebugExtension.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Node/Expression/ArrayExpression.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wt-security/vendor/twig/twig/src/Extension/StringLoaderExtension.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #5 in wt-security/assets to your readme.txt
Please take inspiration from this readme.txt

wt-security/wt-security.php 85% from 13 tests

The entry point to "WebTotem Security" version 2.4.21 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 183 characters long)

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
Success! There were no dangerous files found in this plugin70,715 lines of code in 379 files:
LanguageFilesBlank linesComment linesLines of code
PHP2194,5596,92222,328
JavaScript112,76249718,865
JSON80015,985
CSS51473816,432
Twig54606174,417
PO File18451,0081,819
SVG7700697
YAML24533155
Markdown28017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.24
▷ Minimum class complexity1.00
▷ Maximum class complexity223.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces26
Interfaces11
Traits0
Classes189
▷ Abstract classes115.82%
▷ Concrete classes17894.18%
▷ Final classes5732.02%
Methods1,154
▷ Static methods34629.98%
▷ Public methods1,01187.61%
▷ Protected methods524.51%
▷ Private methods917.89%
Functions187
▷ Named functions17191.44%
▷ Anonymous functions168.56%
Constants72
▷ Global constants1419.44%
▷ Class constants5880.56%
▷ Public constants5798.28%

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
includes/img/logo_17x17_w.png0.48KB0.54KB0.00%