10% simple-security

Code Review | Simple Security

WordPress plugin Simple Security scored10%from 54 tests.

About plugin

  • Plugin page: simple-security
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Mar 2, 2015
  • Number of updates: 25
  • Update frequency: every 33.0 days
  • Top authors: ChrisHurst (84%)MyWebsiteAdvisor (20%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /6,397 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.53ms] Passed 4 tests

Analyzing server-side resources used by Simple Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.57 ▼38.14
Dashboard /wp-admin2.05 ▼1.265.79 ▼47.23
Posts /wp-admin/edit.php2.05 ▼1.316.24 ▼41.19
Add New Post /wp-admin/post-new.php2.05 ▼3.845.90 ▼95.55
Media Library /wp-admin/upload.php2.05 ▼1.186.38 ▼29.19
Simple Security /wp-admin/options-general.php?page=simple-security-settings2.056.09

Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_simple_security_access_log
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
simple-security-settings
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Simple Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.551.61 ▼0.5437.04 ▼9.34
Dashboard /wp-admin2,210 ▲255.81 ▲0.9296.84 ▼17.4738.77 ▼5.99
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0541.15 ▼0.2435.40 ▲0.13
Add New Post /wp-admin/post-new.php1,541 ▲2223.21 ▼0.28681.01 ▼5.6352.16 ▼18.70
Media Library /wp-admin/upload.php1,395 ▲44.17 ▼0.0795.85 ▼6.0141.09 ▼3.73
Simple Security /wp-admin/options-general.php?page=simple-security-settings1,82614.53390.8142.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_simple_security_access_log
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=simple-security-settings
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-security-settings
    • > Notice in wp-content/plugins/simple-security/simple-security-plugin.php+219
    Undefined index: basic_settings
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-security-settings
    • > Notice in wp-content/plugins/simple-security/simple-security-plugin.php+219
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-security/simple-security-access-log-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-security/simple-security-access-log-table.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/simple-security/simple-security-access-log-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-security/simple-security-loader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: security, admin

simple-security/simple-security-loader.php 92% from 13 tests

The principal PHP file in "Simple Security" v. 1.1.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-security.php" instead of "simple-security-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,454 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP109593971,454

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity19.33
▷ Minimum class complexity3.00
▷ Maximum class complexity44.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods90
▷ Static methods00.00%
▷ Public methods7785.56%
▷ Protected methods00.00%
▷ Private methods1314.44%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin