72% antihacker

Code Review | Disable Json API, Login Lockdown, XMLRPC, Pingback, Stop User Enumeration Anti Hacker Scan

WordPress plugin Disable Json API, Login Lockdown, XMLRPC, Pingback, Stop User Enumeration Anti Hacker Scan scored72%from 54 tests.

About plugin

  • Plugin page: antihacker
  • Plugin version: 4.39
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Nov 4, 2023
  • Number of updates: 924
  • Update frequency: every 3.2 days
  • Top authors: sminozzi (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /129,892 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.29MB] [CPU: ▲18.74ms] 75% from 4 tests

An overview of server-side resources used by Disable Json API, Login Lockdown, XMLRPC, Pingback, Stop User Enumeration Anti Hacker Scan
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 5,059.41ms on /wp-admin/admin.php?page=antihacker_my-custom-submenu-page)
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9048.98 ▲7.98
Dashboard /wp-admin4.72 ▲1.4175.38 ▲27.44
Posts /wp-admin/edit.php4.83 ▲1.4771.49 ▲25.43
Add New Post /wp-admin/post-new.php7.31 ▲1.42104.36 ▲14.09
Media Library /wp-admin/upload.php4.66 ▲1.4368.20 ▲33.45
More Tools Same Author /wp-admin/admin.php?page=antihacker_new_more_plugins4.6356.71
Dashboard /wp-admin/admin.php?page=anti_hacker_plugin5.61911.00
Settings /wp-admin/admin.php?page=anti-hacker4.6358.44
Blocked Visits Log /wp-admin/admin.php?page=antihacker_my-custom-submenu-page4.635,059.41
Go Pro /wp-admin/admin.php?page=antihacker_my-custom-submenu-page94.6356.10
Scan For Malware /wp-admin/admin.php?page=antihacker_scan4.6573.97

Server storage [IO: ▲4.12MB] [DB: ▲0.39MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 145 new files
Database: 8 new tables, 16 new options
New tables
wp_ah_tor
wp_ah_stats
wp_ah_scan_files
wp_ah_rules
wp_ah_scan
wp_ah_visitorslog
wp_ah_fingerprint
wp_ah_blockeds
New WordPress options
theysaidso_admin_options
antihacker_safebrowsing
antihacker_version
anti_hacker_last_feedback
antihacker_string_whitelist
antihacker_installed
widget_recent-posts
antihacker_googlesafe_checked
db_upgraded
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for Disable Json API, Login Lockdown, XMLRPC, Pingback, Stop User Enumeration Anti Hacker Scan
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲16415.10 ▲0.863.27 ▲1.3539.53 ▼1.82
Dashboard /wp-admin2,337 ▲1606.60 ▲0.99110.03 ▲21.3477.01 ▲36.52
Posts /wp-admin/edit.php2,256 ▲1563.22 ▲1.1956.53 ▲18.7439.90 ▲0.90
Add New Post /wp-admin/post-new.php1,626 ▲9024.28 ▲1.33622.97 ▲19.6934.25 ▼25.47
Media Library /wp-admin/upload.php1,544 ▲1445.59 ▲1.37115.79 ▲20.1874.68 ▲34.99
More Tools Same Author /wp-admin/admin.php?page=antihacker_new_more_plugins1,0813.0949.3739.92
Dashboard /wp-admin/admin.php?page=anti_hacker_plugin1,6933.1586.7965.27
Settings /wp-admin/admin.php?page=anti-hacker1,0922.9741.1438.62
Blocked Visits Log /wp-admin/admin.php?page=antihacker_my-custom-submenu-page9972.9339.9530.09
Go Pro /wp-admin/admin.php?page=antihacker_my-custom-submenu-page94568.42303.3684.02
Scan For Malware /wp-admin/admin.php?page=antihacker_scan1,1903.1352.3328.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 10 options
    • bill_go_pro_hide
    • antihacker_string_whitelist
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • antihacker_was_activated
    • antihacker_installed
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/antihacker/includes/functions/bill-catch-errors.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/antihacker/scan/functions_scan.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/antihacker/dashboard/circle_status.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/antihacker/dashboard/google_safe.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/antihacker/dashboard/circle_memory.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Antihacker\\WP\\Settings\\Page' not found in wp-content/plugins/antihacker/settings/options/plugin_options_tabbed.php:5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/antihacker/dashboard/themes_and_plugins.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/antihacker/dashboard/root_folder.php:64
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/antihacker/dashboard/root_folder.php on line 69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bill_banners\\get_transient() in wp-content/plugins/antihacker/dashboard/mybanners.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/antihacker/dashboard/themes_and_plugins.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=antihacker_scan
    • > Network (severe)
    http://antihackerplugin.com/wp-admin/admin-ajax.php?action=stopbadbots_grava_fingerprint&fingerprint=%23Europe%2FBucharest%23-120%23linux%20x86_64%23Linux%230%2Cfalse%2Cfalse - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (Plugin Dashboard), #2 (Main Settings Page), #3 (Block Visits Log)
You can look at the official readme.txt

antihacker/antihacker.php Passed 13 tests

Analyzing the main PHP file in "Disable Json API, Login Lockdown, XMLRPC, Pingback, Stop User Enumeration Anti Hacker Scan" version 4.39
120 characters long description:
Improve security, prevent unauthorized access by restrict access to login to whitelisted IP, Firewall, Scanner and more.

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin21,853 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP481,7331,60810,138
JavaScript241,8241,0066,788
CSS112431602,646
PO File27289672,281

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.91
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods83
▷ Static methods1619.28%
▷ Public methods83100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions200
▷ Named functions19497.00%
▷ Anonymous functions63.00%
Constants78
▷ Global constants78100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
41 PNG files occupy 0.95MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/sort_asc.png1.09KB0.25KB▼ 77.46%
images/support.png1.76KB1.28KB▼ 27.27%
images/coupon.png24.96KB5.09KB▼ 79.61%
images/info.png1.49KB1.28KB▼ 14.32%
images/special-offer.png91.41KB37.14KB▼ 59.37%