93% asgard

Code Review | Asgard Security Scanner

WordPress plugin Asgard Security Scanner scored 93% from 54 tests.

About plugin

  • Plugin page: asgard
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.1.1
  • WordPress version: 5.8.1
  • First release: Oct 10, 2014
  • Latest release: Apr 7, 2015
  • Number of updates: 31
  • Update frequency: every 5.8 days
  • Top authors: outself (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active / 5,656 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Asgard Security Scanner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.42 ▲1.01
Dashboard /wp-admin3.07 ▲0.0146.99 ▲8.45
Posts /wp-admin/edit.php3.12 ▲0.0143.62 ▲0.25
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.86 ▼556.04
Media Library /wp-admin/upload.php3.01 ▲0.0129.20 ▼3.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Asgard Security Scanner: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,737 ▲14215.95 ▲0.1011.19 ▲3.5047.26 ▼4.38
Dashboard /wp-admin2,997 ▲635.87 ▼0.09140.93 ▲0.62122.52 ▲2.58
Posts /wp-admin/edit.php2,776 ▲372.58 ▼0.1268.08 ▲3.7591.34 ▼0.05
Add New Post /wp-admin/post-new.php1,694 ▲2218.90 ▼0.20402.00 ▲37.08102.93 ▼4.44
Media Library /wp-admin/upload.php1,785 ▼195.01 ▲0.00123.95 ▼18.46143.81 ▲28.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/asgard/asgard.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 86% 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 to be fixed:
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === asgard === )
  • Screenshots: Screenshot #1 (Scan In Action) image not found
The official readme.txt might help

asgard/asgard.php 92% from 13 tests

The main file in "Asgard Security Scanner" v. 0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,426 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions21100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.17MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png175.67KB53.50KB▼ 69.55%
icon_small.png1.09KB0.26KB▼ 76.18%