84% virus-activity

Code Review | Virus Activity

WordPress plugin Virus Activity scored84%from 54 tests.

About plugin

  • Plugin page: virus-activity
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2016
  • Latest release: Jan 3, 2018
  • Number of updates: 12
  • Update frequency: every 48.3 days
  • Top authors: virusactivity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,234 total downloads

Benchmarks

Plugin footprint 83% from 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.09MB] [CPU: ▼8.45ms] Passed 4 tests

Server-side resources used by Virus Activity
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.25 ▲0.53
Dashboard /wp-admin3.41 ▲0.0652.55 ▼14.53
Posts /wp-admin/edit.php3.52 ▲0.1651.22 ▲2.04
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.57 ▼18.68
Media Library /wp-admin/upload.php3.33 ▲0.1040.10 ▼1.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
widget_virus_activity_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Virus Activity
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.531.89 ▲0.0244.30 ▲2.57
Dashboard /wp-admin2,198 ▲245.61 ▲0.0084.11 ▼7.1842.31 ▲2.39
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0336.91 ▲1.5436.00 ▼2.25
Add New Post /wp-admin/post-new.php1,404 ▼12218.23 ▼4.84622.19 ▼220.2251.66 ▼12.23
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.05110.79 ▲10.3549.46 ▲1.81

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/virus-activity/class-virus-activity-widget.php
    • > /wp-content/plugins/virus-activity/class-virus-activity.php
    • > /wp-content/plugins/virus-activity/config.php
    • > /wp-content/plugins/virus-activity/virus-activity.php
    • > /wp-content/plugins/virus-activity/class-virus-activity-plugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: malware, technology, computer security, virus activity, spyware...

virus-activity/virus-activity.php Passed 13 tests

The main file in "Virus Activity" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
41 characters long description:
Display Virus Activity level on your blog

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
No dangerous file extensions were detected1,833 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PO File2647511,288
PHP510879545

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity32.00
▷ Minimum class complexity4.00
▷ Maximum class complexity64.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1027.78%
▷ Public methods3083.33%
▷ Protected methods00.00%
▷ Private methods616.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
world3x.png30.19KB10.49KB▼ 65.24%
world2x.png16.36KB6.21KB▼ 62.02%
world.png5.68KB2.84KB▼ 49.93%