78% secupress

Code Review | SecuPress Free — WordPress Security

WordPress plugin SecuPress Free — WordPress Security scored78%from 54 tests.

About plugin

  • Plugin page: secupress
  • Plugin version: 2.2.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Apr 18, 2023
  • Number of updates: 388
  • Update frequency: every 6.2 days
  • Top authors: juliobox (88.4%)wp_media (11.86%)

Code review

54 tests

User reviews

98 reviews

Install metrics

40,000+ active /566,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲2.15MB] [CPU: ▲21.14ms] Passed 4 tests

Server-side resources used by SecuPress Free — WordPress Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.86 ▲1.4061.92 ▲19.86
Dashboard /wp-admin5.69 ▲2.3972.28 ▲17.79
Posts /wp-admin/edit.php5.75 ▲2.3969.55 ▲23.12
Add New Post /wp-admin/post-new.php8.34 ▲2.45120.53 ▲30.37
Media Library /wp-admin/upload.php5.64 ▲2.4164.42 ▲23.77
Scanners 0 /wp-admin/admin.php?page=secupress_scanners7.4770.86
Modules /wp-admin/admin.php?page=secupress_modules6.07309.99

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 347 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SecuPress Free — WordPress Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,730 ▲96913.22 ▼1.134.99 ▲3.2541.81 ▼0.26
Dashboard /wp-admin2,781 ▲6035.76 ▲0.1099.71 ▼1.8639.86 ▼5.40
Posts /wp-admin/edit.php2,650 ▲5472.12 ▲0.1138.75 ▲3.4937.04 ▼1.42
Add New Post /wp-admin/post-new.php1,919 ▲39123.29 ▲0.21665.64 ▼8.6557.52 ▲5.37
Media Library /wp-admin/upload.php2,027 ▲6274.34 ▲0.20102.03 ▼4.5741.10 ▼4.77
Scanners 0 /wp-admin/admin.php?page=secupress_scanners4,8692.4042.2564.31
Modules /wp-admin/admin.php?page=secupress_modules2,5702.3150.0298.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please fix the following
  • 215× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/secupress/free/modules/file-system/settings/file-scanner.php
    • > /wp-content/plugins/secupress/free/modules/antispam/plugins/fightspam.php
    • > /wp-content/plugins/secupress/free/classes/scanners/class-secupress-scan-bad-old-files.php
    • > /wp-content/plugins/secupress/free/modules/schedules/settings.php
    • > /wp-content/plugins/secupress/free/admin/scanner-step-3.php
    • > /wp-content/plugins/secupress/secupress.php
    • > /wp-content/plugins/secupress/free/modules/wordpress-core/plugins/wp-config-constant-debugging.php
    • > /wp-content/plugins/secupress/free/modules/alerts/tools.php
    • > /wp-content/plugins/secupress/free/modules/wordpress-core/plugins/wp-config-constant-cookiehash.php
    • > /wp-content/plugins/secupress/free/modules/schedules/settings/schedules-file-monitoring.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/secupress/vendor/perfopsone/decalog/src/EventsLogger.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/secupress/free/admin/scanner-step-1-new.php:10
    • > PHP Notice
      Undefined variable: module_name in wp-content/plugins/secupress/free/admin/scanner-step-1-all.php on line 5
    • > PHP Notice
      Undefined variable: is_subsite in wp-content/plugins/secupress/free/admin/scanner-step-1-all.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/secupress/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/secupress/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Notice
      Undefined variable: module_name in wp-content/plugins/secupress/free/admin/scanner-step-1-all.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/secupress/vendor/psr/log/Psr/Log/Test/TestLogger.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function secupress_admin_url() in wp-content/plugins/secupress/free/admin/scanner-step-1-all.php:17
    • > PHP Notice
      Undefined variable: module_name in wp-content/plugins/secupress/free/admin/scanner-step-1-all.php on line 6

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: wordpress security, security plugin, secure, security, malware

secupress/secupress.php Passed 13 tests

The principal PHP file in "SecuPress Free — WordPress Security" v. 2.2.4.1 is loaded by WordPress automatically on each request
68 characters long description:
More than a plugin, the guarantee of a protected website by experts.

Code Analysis 97% from 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
No dangerous file extensions were detected49,969 lines of code in 303 files:
LanguageFilesBlank linesComment linesLines of code
PHP2507,78417,61427,605
JavaScript241,8261,2067,843
CSS234203477,207
PO File12,3584,2576,684
Sass1997420
JSON100111
SVG30099

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity26.75
▷ Minimum class complexity1.00
▷ Maximum class complexity245.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces6
Interfaces3
Traits2
Classes79
▷ Abstract classes78.86%
▷ Concrete classes7291.14%
▷ Final classes11.39%
Methods858
▷ Static methods20624.01%
▷ Public methods55164.22%
▷ Protected methods29534.38%
▷ Private methods121.40%
Functions610
▷ Named functions59497.38%
▷ Anonymous functions162.62%
Constants124
▷ Global constants5241.94%
▷ Class constants7258.06%
▷ Public constants72100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 PNG files occupy 0.17MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/logo-pro.png5.07KB3.01KB▼ 40.69%
assets/admin/images/secupress-movelogin-error-preview-fr_FR.png28.76KB9.65KB▼ 66.44%
free/modules/users-login/plugins/inc/img/backup-codes-icon_2X.png6.98KB4.57KB▼ 34.57%
free/modules/users-login/plugins/inc/img/authenticator-Android-phone-icon_2X.png5.49KB3.52KB▼ 35.86%
assets/admin/images/bg-logo-sp.png3.91KB4.31KB0.00%