10% wp-security-enhancer

Code Review | WP Security Enhancer

WordPress plugin WP Security Enhancer scored10%from 54 tests.

About plugin

  • Plugin page: wp-security-enhancer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Nov 12, 2012
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: gefruckelt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-security-enhancer/wp_security_enhancer.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; WPSecurityEnhancer has a deprecated constructor

Server metrics [RAM: ▲19.04MB] [CPU: ▼43.07ms] 75% from 4 tests

Server-side resources used by WP Security Enhancer
Please have a look at the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 19.04MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /23.03 ▲19.5617.91 ▼27.60
Dashboard /wp-admin23.05 ▲19.7421.29 ▼30.29
Posts /wp-admin/edit.php23.05 ▲19.6919.88 ▼30.41
Add New Post /wp-admin/post-new.php23.05 ▲17.1616.40 ▼83.99
Media Library /wp-admin/upload.php23.05 ▲19.8219.68 ▼19.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
WPSecurityEnhancer-filelist
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Security Enhancer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.141.68 ▼0.6742.47 ▼2.64
Dashboard /wp-admin2,195 ▲215.48 ▼0.1987.25 ▼10.9738.65 ▼5.42
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0335.69 ▼2.0033.52 ▼2.42
Add New Post /wp-admin/post-new.php1,526 ▼1423.52 ▲5.37687.91 ▲59.6457.10 ▼28.23
Media Library /wp-admin/upload.php1,403 ▼04.20 ▲0.0295.79 ▼6.7540.58 ▼5.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-security-enhancer/wp_security_enhancer.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; WPSecurityEnhancer has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • WPSecurityEnhancer-filelist
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-security-enhancer/wp_security_enhancer.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: security

wp-security-enhancer/wp_security_enhancer.php 92% from 13 tests

The entry point to "WP Security Enhancer" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-security-enhancer.php" instead of "wp_security_enhancer.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
Success! There were no dangerous files found in this plugin170 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13910170

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin