74% deny-all-firewall

Code Review | Deny All Firewall

WordPress plugin Deny All Firewall scored74%from 54 tests.

About plugin

  • Plugin page: deny-all-firewall
  • Plugin version: 1.7.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.4
  • WordPress version: 6.3.1
  • First release: May 24, 2019
  • Latest release: Oct 31, 2023
  • Number of updates: 105
  • Update frequency: every 15.6 days
  • Top authors: domainsupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /6,161 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.43MB] [CPU: ▲1.06ms] Passed 4 tests

A check of server-side resources used by Deny All Firewall
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4246.71 ▲6.35
Dashboard /wp-admin3.74 ▲0.4347.25 ▼6.08
Posts /wp-admin/edit.php3.86 ▲0.4947.57 ▲2.05
Add New Post /wp-admin/post-new.php6.33 ▲0.4492.38 ▲1.92
Media Library /wp-admin/upload.php3.66 ▲0.4340.02 ▲8.81
Deny All Firewall /wp-admin/options-general.php?page=daf_settings3.6938.92

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Deny All Firewall
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.72 ▲0.351.92 ▲0.3237.44 ▼5.89
Dashboard /wp-admin2,199 ▲195.61 ▼0.0187.33 ▼12.6839.82 ▼3.83
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0333.63 ▼9.6834.30 ▲0.35
Add New Post /wp-admin/post-new.php6,229 ▲4,70326.18 ▲4.19827.85 ▲125.8657.11 ▲2.63
Media Library /wp-admin/upload.php1,407 ▲44.22 ▼0.01100.54 ▼7.0741.52 ▼0.39
Deny All Firewall /wp-admin/options-general.php?page=daf_settings1,6306.88144.1876.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/deny-all-firewall/deny-all-firewall.php+1036
    Invalid argument supplied for foreach()
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/deny-all-firewall/deny-all-firewall.php
    • > /wp-content/plugins/deny-all-firewall/remote-addr.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: carbon footprint, firewall, deny from all, green, htaccess

deny-all-firewall/deny-all-firewall.php Passed 13 tests

"Deny All Firewall" version 1.7.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Blocks access to everything except genuine site content using .htaccess

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
Success! There were no dangerous files found in this plugin2,191 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP41,308422,179
JavaScript15312

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 200)
Cyclomatic complexity
Average complexity per logical line of code0.78
Average class complexity157.00
▷ Minimum class complexity6.00
▷ Maximum class complexity380.00
Average method complexity8.43
▷ Minimum method complexity1.00
▷ Maximum method complexity200.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods63
▷ Static methods2438.10%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected