68% wp-security-pro

Code Review | Wordpress Security - Firewall, Malware Scanner, Secure Login and Backup

WordPress plugin Wordpress Security - Firewall, Malware Scanner, Secure Login and Backup scored68%from 54 tests.

About plugin

Code review

54 tests

User reviews

12 reviews

Install metrics

700+ active /39,632 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.77ms] Passed 4 tests

Analyzing server-side resources used by Wordpress Security - Firewall, Malware Scanner, Secure Login and Backup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2044.42 ▲2.89
Dashboard /wp-admin3.41 ▲0.1159.06 ▲4.97
Posts /wp-admin/edit.php3.46 ▲0.1155.60 ▲3.23
Add New Post /wp-admin/post-new.php6.01 ▲0.1291.16 ▼0.01
Media Library /wp-admin/upload.php3.33 ▲0.1046.14 ▲6.86
WAF /wp-admin/admin.php?page=mo_mmp_waf3.5278.11
Backup /wp-admin/admin.php?page=mo_mmp_backup3.4149.25
Dashboard /wp-admin/admin.php?page=mo_mmp_dashboard3.3547.51
Upgrade /wp-admin/admin.php?page=mo_mmp_upgrade3.3649.79
Account /wp-admin/admin.php?page=mo_mmp_account3.4046.96
Malware Scan /wp-admin/admin.php?page=mo_mmp_malwarescan3.5156.40
Login and Spam /wp-admin/admin.php?page=mo_mmp_login_and_spam3.4156.50
Reports /wp-admin/admin.php?page=mo_mmp_reports3.3848.44
Advanced Blocking /wp-admin/admin.php?page=mo_mmp_advancedblocking3.4250.86
Notifications /wp-admin/admin.php?page=mo_mmp_notifications3.4155.51

Server storage [IO: ▲1.12MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 125 new files
Database: 11 new tables, 33 new options
New tables
wp_wpns_blocked_ips
wp_wpns_transactions
wp_wpns_attack_logs
wp_wpns_whitelisted_ips
wp_wpns_malware_skip_files
wp_wpns_malware_scan_report
wp_wpns_malware_scan_report_details
wp_wpns_malware_hash_file
wp_wpns_files_scan
wp_wpns_email_sent_audit
...
New WordPress options
mo_mmp_scan_plugins
mo_mmp_dbversion
limitAttack
mo_mmp_switch_loginspam
XSSAttack
mo_mmp_switch_backup
mo_wpns_enable_ip_blocked_email_to_admin
WAFEnabled
Rate_request
mo_mmp_switch_reports
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Security - Firewall, Malware Scanner, Secure Login and Backup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,002 ▲24113.22 ▼1.034.77 ▲2.8439.26 ▼2.28
Dashboard /wp-admin2,365 ▲1855.82 ▲0.2188.56 ▼9.8896.03 ▲56.66
Posts /wp-admin/edit.php2,190 ▲902.10 ▲0.1237.18 ▼3.9235.04 ▼3.29
Add New Post /wp-admin/post-new.php1,593 ▲6723.49 ▼0.04727.77 ▲27.9853.99 ▲0.41
Media Library /wp-admin/upload.php1,486 ▲864.22 ▲0.00110.72 ▲8.4273.15 ▲26.30
WAF /wp-admin/admin.php?page=mo_mmp_waf2,2152.4553.7247.37
Backup /wp-admin/admin.php?page=mo_mmp_backup1,1812.3232.0734.64
Dashboard /wp-admin/admin.php?page=mo_mmp_dashboard1,0512.2228.5740.89
Upgrade /wp-admin/admin.php?page=mo_mmp_upgrade1,1142.2429.7541.71
Account /wp-admin/admin.php?page=mo_mmp_account1,1952.2730.3731.28
Malware Scan /wp-admin/admin.php?page=mo_mmp_malwarescan1,8002.4745.6834.81
Login and Spam /wp-admin/admin.php?page=mo_mmp_login_and_spam1,4462.3232.9333.22
Reports /wp-admin/admin.php?page=mo_mmp_reports1,5092.5446.9237.46
Advanced Blocking /wp-admin/admin.php?page=mo_mmp_advancedblocking2,2002.4030.8544.64
Notifications /wp-admin/admin.php?page=mo_mmp_notifications2,0718.73167.9375.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wpns_ip_rate_details
  • Zombie WordPress options detected upon uninstall: 17 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • limitAttack
    • WAFEnabled
    • Rate_request
    • LFIAttack
    • XSSAttack
    • mo_wpns_new_registration
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-security-pro/controllers/malware_scanner/scan_malware.php
    • > /wp-content/plugins/wp-security-pro/views/troubleshooting.php
    • > /wp-content/plugins/wp-security-pro/handler/mo-error.php
    • > /wp-content/plugins/wp-security-pro/views/login_spam.php
    • > /wp-content/plugins/wp-security-pro/handler/mo-block.php
  • 123× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(views/login_spam.php): failed to open stream: No such file or directory in wp-content/plugins/wp-security-pro/controllers/login-spam.php on line 8
    • > PHP Warning
      include(): Failed opening 'views/troubleshooting.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-security-pro/controllers/troubleshooting.php on line 5
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/wp-security-pro/controllers/change-password.php on line 5
    • > PHP Notice
      Undefined variable: user in wp-content/plugins/wp-security-pro/controllers/change-password.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/wp-security-pro/controllers/licensing.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-security-pro/views/login-security.php:15
    • > PHP Notice
      Trying to get property 'user_login' of non-object in wp-content/plugins/wp-security-pro/controllers/change-password.php on line 5
    • > PHP Warning
      include(helper/link_tracers.php): failed to open stream: No such file or directory in wp-content/plugins/wp-security-pro/views/waf.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-security-pro/views/change-password.php:21
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-security-pro/views/ip-blocking.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-security-pro/mo-wpns.php 92% from 13 tests

This is the main PHP file of "Wordpress Security - Firewall, Malware Scanner, Secure Login and Backup" version 4.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-security-pro.php" instead of "mo-wpns.php")

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
There were no executable files found in this plugin17,975 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP1001,76311114,824
CSS7225542,913
JavaScript32315238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity37.39
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods302
▷ Static methods154.97%
▷ Public methods28193.05%
▷ Protected methods00.00%
▷ Private methods216.95%
Functions77
▷ Named functions77100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants32.36%
▷ Class constants12497.64%
▷ Public constants124100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.20MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/error.png1.04KB1.13KB0.00%
includes/images/61456.png3.64KB3.62KB▼ 0.62%
includes/images/flags16.png61.80KB19.90KB▼ 67.79%
includes/images/smile.png17.89KB8.79KB▼ 50.86%
includes/images/wrong.png30.98KB13.50KB▼ 56.42%