77% anti-hacker

Code Review | Anti-Hacker - Security Plugin

WordPress plugin Anti-Hacker - Security Plugin scored77%from 54 tests.

About plugin

  • Plugin page: anti-hacker
  • Plugin version: 0.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2023
  • Latest release: Nov 29, 2023
  • Number of updates: 17
  • Update frequency: every 9.8 days
  • Top authors: emiliocini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼10.69ms] Passed 4 tests

This is a short check of server-side resources used by Anti-Hacker - Security Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2640.26 ▼0.78
Dashboard /wp-admin3.65 ▲0.3048.80 ▼14.92
Posts /wp-admin/edit.php3.70 ▲0.3448.45 ▲3.93
Add New Post /wp-admin/post-new.php6.17 ▲0.2881.27 ▼28.60
Media Library /wp-admin/upload.php3.51 ▲0.2836.35 ▲1.56

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Anti-Hacker - Security Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5714.45 ▲0.101.59 ▼0.0339.67 ▼3.74
Dashboard /wp-admin2,227 ▲505.64 ▲0.1095.24 ▼1.4842.05 ▲0.99
Posts /wp-admin/edit.php2,132 ▲292.02 ▲0.0639.73 ▼0.7335.86 ▲3.55
Add New Post /wp-admin/post-new.php1,550 ▲1523.29 ▼1.80597.21 ▼48.1747.80 ▼15.33
Media Library /wp-admin/upload.php1,432 ▲384.18 ▼0.01101.61 ▲0.5943.95 ▲1.70
Settings /wp-admin/wpah-settings.php260.410.0715.82
Logs /wp-admin/wpah-logs.php260.410.098.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/anti-hacker/includes/wpah-htaccess.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/anti-hacker/includes/wpah-htaccess.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/anti-hacker/wpah-index.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/wpah-settings.php
    • > Network (severe)
    wp-admin/wpah-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/wpah-logs.php
    • > Network (severe)
    wp-admin/wpah-logs.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
  • Screenshots: Screenshot #1 (Anti-Hacker settings screen.) image missing
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

anti-hacker/wpah-index.php 77% from 13 tests

"Anti-Hacker - Security Plugin" version 0.5.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("anti-hacker.php" instead of "wpah-index.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,600 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP153051621,521
Markdown132076
CSS1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions92
▷ Named functions8289.13%
▷ Anonymous functions1010.87%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected