78% infisecure

Code Review | Infisecure

WordPress plugin Infisecure scored 78% from 54 tests.

About plugin

  • Plugin page: infisecure
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8
  • WordPress version: 5.8.1
  • First release: Jul 3, 2017
  • Latest release: Jul 3, 2017
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: infisecuredevteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 414 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼151.25ms] Passed 4 tests

An overview of server-side resources used by Infisecure
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0735.01 ▼5.08
Dashboard /wp-admin3.17 ▲0.1147.80 ▼13.82
Posts /wp-admin/edit.php3.28 ▲0.1741.85 ▼6.70
Add New Post /wp-admin/post-new.php5.52 ▲0.0991.51 ▼579.38
Media Library /wp-admin/upload.php3.11 ▲0.1136.36 ▲2.21
InfiSecure Setting /wp-admin/options-general.php?page=infisecure_option3.0628.18

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

Input-output and database impact of this plugin
These are issues you should consider
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/infisecure/" and "wp-content/uploads/"
    • (new file) infisecure_ns_cache
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Infisecure
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲14015.89 ▲0.2010.65 ▲0.6544.36 ▼8.03
Dashboard /wp-admin2,972 ▲385.96 ▼0.02148.11 ▲0.23110.50 ▼5.80
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0261.15 ▼10.4887.93 ▲2.53
Add New Post /wp-admin/post-new.php1,607 ▼2,03618.80 ▼1.89409.06 ▼88.87107.17 ▼3.60
Media Library /wp-admin/upload.php1,815 ▲85.03 ▼0.01144.35 ▼11.72114.02 ▲4.26
InfiSecure Setting /wp-admin/options-general.php?page=infisecure_option1,2172.1059.5970.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'InfiSecure' does not have a method 'plugin_deactivation'

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=infisecure_option
    • > Notice in wp-content/plugins/infisecure/includes/setting.php+129
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/infisecure/includes/setting.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/infisecure/includes/frontend-scripts.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/infisecure/infisecure.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: bot, explore frauds, detection, real time protection, real time traffic...

infisecure/infisecure.php 92% from 13 tests

The entry point to "Infisecure" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin626 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP577103626

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods19
▷ Static methods315.79%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions7
▷ Named functions7100.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