10% wp-security-by-made-it

Code Review | WP Security By Made I.T.

WordPress plugin WP Security By Made I.T. scored 10% from 54 tests.

About plugin

  • Plugin page: wp-security-by-ma...
  • Plugin version: 1.8.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 4, 2017
  • Latest release: Aug 11, 2020
  • Number of updates: 62
  • Update frequency: every 16.8 days
  • Top authors: madeit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,573 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Settings.php+15
    Constant MADEIT_SECURITY_API already defined

Server metrics [RAM: ▼1.88MB] [CPU: ▼42.68ms] Passed 4 tests

Analyzing server-side resources used by WP Security By Made I.T.
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.3512.37 ▼27.16
Dashboard /wp-admin2.13 ▼1.1716.76 ▼31.52
Posts /wp-admin/edit.php2.13 ▼1.2218.77 ▼33.30
Add New Post /wp-admin/post-new.php2.13 ▼3.7615.10 ▼78.75
Media Library /wp-admin/upload.php2.13 ▼1.0918.09 ▼18.12
Server info /wp-admin/admin.php?page=madeit_security_systeminfo2.1315.38
Settings /wp-admin/admin.php?page=madeit_security_settings2.1317.66
Firewall /wp-admin/admin.php?page=madeit_security_firewall2.1318.05
Scan /wp-admin/admin.php?page=madeit_security_scan2.1318.35
Dashboard /wp-admin/admin.php?page=madeit_security2.1317.47

Server storage [IO: ▲2.06MB] [DB: ▲0.73MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • The plugin illegally modified 6 files (1.27KB) outside of "wp-content/plugins/wp-security-by-made-it/" and "wp-content/uploads/"
    • (new file) wp-content/madeit-security-backup/.htaccess
    • (new file) wp-content/madeit-security-backup/wp-security-config.php
    • (new file) wp-content/madeit-security-backup/wp-security-blocks.php
    • (new file) wp-content/madeit-security-backup/error.log
    • (new file) wp-content/madeit-security-backup/index.html
    • (new file) wp-content/madeit-security-backup/web.config
Filesystem: 97 new files
Database: 5 new tables, 7 new options
New tables
wp_madeit_sec_filelist
wp_madeit_sec_blockip
wp_madeit_sec_login_attempts
wp_madeit_sec_login
wp_madeit_sec_issues
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
madeit_security_api_key

Browser metrics Passed 4 tests

A check of browser resources used by WP Security By Made I.T.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11313.17 ▼1.011.85 ▲0.1637.31 ▼4.84
Dashboard /wp-admin2,264 ▲736.00 ▲1.16117.73 ▲12.89101.21 ▲59.72
Posts /wp-admin/edit.php2,147 ▲552.07 ▲0.0131.90 ▼5.2033.49 ▼1.86
Add New Post /wp-admin/post-new.php1,719 ▲18520.15 ▼2.94726.31 ▲51.6436.43 ▼20.63
Media Library /wp-admin/upload.php1,446 ▲584.24 ▲0.0091.50 ▼26.2370.01 ▲21.75
Server info /wp-admin/admin.php?page=madeit_security_systeminfo7,1981.8527.1074.03
Settings /wp-admin/admin.php?page=madeit_security_settings1,3952.0631.4544.35
Firewall /wp-admin/admin.php?page=madeit_security_firewall9691.9325.6138.27
Scan /wp-admin/admin.php?page=madeit_security_scan1,0302.0634.2343.38
Dashboard /wp-admin/admin.php?page=madeit_security1,2201.9633.1142.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Settings.php+15
    Constant MADEIT_SECURITY_API already defined
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_madeit_sec_login_attempts
    • wp_madeit_sec_issues
    • wp_madeit_sec_filelist
    • wp_madeit_sec_blockip
    • wp_madeit_sec_login
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • madeit_security_api_key
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=madeit_security
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Settings.php+15
    Constant MADEIT_SECURITY_API already defined
    • > GET request to /wp-admin/admin.php?page=madeit_security_systeminfo
    • > Deprecated in wp-content/plugins/wp-security-by-made-it/admin/templates/system_info.php+402
    implode(): Passing glue string after array is deprecated. Swap the parameters
    • > GET request to /wp-admin/admin.php?page=madeit_security_scan
    • > POST request to /wp-cron.php?doing_wp_cron=1696144723.6668920516967773437500
    • > Warning in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Scan.php+27
    file_get_contents(https://www.madeit.be/wordpress-onderhoud/api/1.0/wp/getPattern/1): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

  • 204 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=madeit_security_scan
    • > POST request to /wp-cron.php?doing_wp_cron=1696144723.6668920516967773437500
    • > Notice in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Scan.php+122
    Trying to access array offset on value of type null
  • 102 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=madeit_security_scan
    • > POST request to /wp-cron.php?doing_wp_cron=1696144723.6668920516967773437500
    • > Warning in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Scan.php+116
    preg_match(): Empty regular expression
  • 51 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=madeit_security_scan
    • > POST request to /wp-cron.php?doing_wp_cron=1696144723.6668920516967773437500
    • > Deprecated in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Scan.php+122
    strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-security-by-made-it/madeit-security.php
    • > /wp-content/plugins/wp-security-by-made-it/admin/email-wp-security-report-weekly.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/class-wp-upgrader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Installer.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Installer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Core_Upgrader' not found in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Core_Installer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Theme_Upgrader' not found in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Theme_Installer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin_Upgrader' not found in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Installer.php:5
    • > PHP Warning
      Use of undefined constant MADEIT_SECURITY_LOG_PATH - assumed 'MADEIT_SECURITY_LOG_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-security-by-made-it/inc/firewall/WP_MadeIT_Security_Init.php on line 43
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/wp-security-by-made-it/inc/WP_MadeIT_Security_Plugin_Installer.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: secure, maintenance, security, security plugin, maintenance plugin...

wp-security-by-made-it/madeit-security.php 92% from 13 tests

The entry point to "WP Security By Made I.T." version 1.8.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-security-by-made-it.php" instead of "madeit-security.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin19,673 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,4062,36612,431
CSS9261933,451
SVG1002,671
PO File24104781,036
XML341275
JavaScript1008
YAML1111

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity33.12
▷ Minimum class complexity1.00
▷ Maximum class complexity268.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes510.00%
▷ Concrete classes4590.00%
▷ Final classes12.22%
Methods431
▷ Static methods5813.46%
▷ Public methods32174.48%
▷ Protected methods10.23%
▷ Private methods10925.29%
Functions15
▷ Named functions1280.00%
▷ Anonymous functions320.00%
Constants24
▷ Global constants937.50%
▷ Class constants1562.50%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/smoothness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
admin/css/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/icon-128x128.png21.58KB2.55KB▼ 88.19%
assets/icon-64x64.png19.95KB2.06KB▼ 89.65%
admin/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%