78% security-assassin

Code Review | Security Assassin

WordPress plugin Security Assassin scored78%from 54 tests.

About plugin

  • Plugin page: security-assassin
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.7
  • WordPress version: 6.3.1
  • First release: Dec 10, 2015
  • Latest release: Dec 8, 2016
  • Number of updates: 23
  • Update frequency: every 15.9 days
  • Top authors: YurchenkoEV (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,160 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.28ms] Passed 4 tests

A check of server-side resources used by Security Assassin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.51 ▼2.43
Dashboard /wp-admin3.40 ▲0.0551.78 ▼14.42
Posts /wp-admin/edit.php3.51 ▲0.1555.36 ▼0.04
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.97 ▼7.29
Media Library /wp-admin/upload.php3.32 ▲0.0936.86 ▼0.98
Security Assassin /wp-admin/options-general.php?page=security-assassin/security-assassin.php3.2635.55

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

A short overview of filesystem and database impact
Just a few items left to fix
  • There were 2 files (4.58KB) illegally modified outside of "wp-content/plugins/security-assassin/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
    • (modified) .htaccess
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
WPA_set
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Security Assassin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.26 ▼1.471.66 ▼0.1940.12 ▼1.22
Dashboard /wp-admin2,228 ▲255.82 ▼0.0897.68 ▼6.9742.17 ▼3.27
Posts /wp-admin/edit.php2,107 ▲72.05 ▲0.0041.88 ▲1.7837.86 ▲1.14
Add New Post /wp-admin/post-new.php1,553 ▲823.29 ▲0.26645.33 ▼61.8451.40 ▼2.61
Media Library /wp-admin/upload.php1,407 ▲44.22 ▲0.02100.17 ▼5.7144.25 ▼7.83
Security Assassin /wp-admin/options-general.php?page=security-assassin/security-assassin.php8282.0524.3727.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=security-assassin/security-assassin.php
    • > Notice in wp-content/plugins/security-assassin/security-assassin.php+382
    Trying to access array offset on value of type null

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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/security-assassin/security-assassin.php:518

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === security-assassin === )
You can look at the official readme.txt

security-assassin/security-assassin.php Passed 13 tests

The main PHP script in "Security Assassin" version 1.1.4 is automatically included on every request by WordPress
118 characters long description:
It protects against third-party access the file system on your site and/or hide your site from users who did not login

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 detected497 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14592387
JavaScript1161478
HTML10032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity73.00
▷ Minimum class complexity73.00
▷ Maximum class complexity73.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods2488.89%
▷ Public methods1244.44%
▷ Protected methods00.00%
▷ Private methods1555.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin