63% security-safe

Code Review | WP Security Safe

WordPress plugin WP Security Safe scored63%from 54 tests.

About plugin

  • Plugin page: security-safe
  • Plugin version: 2.6.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2018
  • Latest release: Nov 3, 2023
  • Number of updates: 106
  • Update frequency: every 20.1 days
  • Top authors: sovstack (88.68%)stevenayers63 (12.26%)

Code review

54 tests

User reviews

14 reviews

Install metrics

700+ active /13,498 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.60MB] [CPU: ▲22.84ms] 75% from 4 tests

Analyzing server-side resources used by WP Security Safe
The following require your attention
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.60MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.30 ▲5.8463.07 ▲22.40
Dashboard /wp-admin9.32 ▲5.9880.91 ▲15.50
Posts /wp-admin/edit.php9.33 ▲5.9782.86 ▲37.72
Add New Post /wp-admin/post-new.php10.49 ▲4.60109.63 ▲15.77
Media Library /wp-admin/upload.php9.32 ▲6.1072.49 ▲37.70
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.3261.75

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 265 new files
Database: 2 new tables, 10 new options
New tables
wp_sovstack_stats
wp_sovstack_logs
New WordPress options
fs_accounts
fs_debug_mode
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
securitysafe_options
fs_active_plugins
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Security Safe
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲9914.67 ▲0.321.63 ▼0.1129.04 ▼31.40
Dashboard /wp-admin2,244 ▲675.56 ▼0.1099.68 ▲2.8349.53 ▲4.51
Posts /wp-admin/edit.php2,156 ▲561.98 ▲0.0241.74 ▲2.8239.57 ▲3.86
Add New Post /wp-admin/post-new.php1,538 ▲1222.32 ▼0.83716.07 ▲16.4651.84 ▼0.04
Media Library /wp-admin/upload.php1,452 ▲554.21 ▲0.02114.20 ▲13.9049.06 ▲2.93
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1041.6724.8625.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/security-safe/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 2 tables
    • wp_sovstack_logs
    • wp_sovstack_stats
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-posts
    • securitysafe_options
    • fs_debug_mode

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SovereignStack\\SecuritySafe\\plugin_dir_url() in wp-content/plugins/security-safe/security-safe.php:7

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 uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (File Permissions), #2 (Login Attempts), #3 (Firewall Blocks)
Please take inspiration from this readme.txt

security-safe/security-safe.php 92% from 13 tests

The entry point to "WP Security Safe" version 2.6.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • 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

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected43,344 lines of code in 189 files:
LanguageFilesBlank linesComment linesLines of code
PHP15810,19219,97338,341
PO File31,2211,5184,064
Sass22183530
JavaScript75771231
JSON100116
SVG214046
CSS160016

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity59.49
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes90
▷ Abstract classes22.22%
▷ Concrete classes8897.78%
▷ Final classes89.09%
Methods1,541
▷ Static methods25816.74%
▷ Public methods1,04167.55%
▷ Protected methods815.26%
▷ Private methods41927.19%
Functions105
▷ Named functions10398.10%
▷ Anonymous functions21.90%
Constants198
▷ Global constants15176.26%
▷ Class constants4723.74%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.19MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png50.04KB53.10KB0.00%
screenshot-3.png51.27KB55.03KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
screenshot-1.png68.86KB73.82KB0.00%