93% scare-hackers-off

Code Review | Anti Hacker Redirect

WordPress plugin Anti Hacker Redirect scored 93% from 54 tests.

About plugin

  • Plugin page: scare-hackers-off
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.2
  • WordPress version: 5.8.1
  • First release: Jul 5, 2016
  • Latest release: Feb 3, 2017
  • Number of updates: 12
  • Update frequency: every 17.8 days
  • Top authors: riotweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,126 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼139.71ms] Passed 4 tests

Server-side resources used by Anti Hacker Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.70 ▲11.73
Dashboard /wp-admin3.06 ▲0.0152.25 ▲7.82
Posts /wp-admin/edit.php3.12 ▲0.0148.51 ▲3.87
Add New Post /wp-admin/post-new.php5.43 ▼0.00100.63 ▼566.09
Media Library /wp-admin/upload.php3.01 ▼0.0053.18 ▼4.42

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

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (0.78KB) outside of "wp-content/plugins/scare-hackers-off/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Anti Hacker Redirect: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.93 ▲0.409.58 ▲0.5250.36 ▲3.00
Dashboard /wp-admin2,967 ▲365.90 ▼0.05150.48 ▲3.78115.73 ▲4.12
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0070.49 ▼6.1988.25 ▼6.55
Add New Post /wp-admin/post-new.php1,683 ▲10218.56 ▲1.02433.56 ▼106.39112.06 ▼68.95
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.03177.60 ▼50.67131.41 ▼38.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/scare-hackers-off/scarehackers.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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

scare-hackers-off/scarehackers.php 92% from 13 tests

Analyzing the main PHP file in "Anti Hacker Redirect" version 1.1
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("scare-hackers-off.php" instead of "scarehackers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191321

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin