89% awp-antivirus

Code Review | AWP antivirus

WordPress plugin AWP antivirus scored 89% from 54 tests.

About plugin

  • Plugin page: awp-antivirus
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Feb 9, 2017
  • Number of updates: 75
  • Update frequency: every 3.1 days
  • Top authors: cwsagency (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

40+ active / 4,591 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.78ms] Passed 4 tests

An overview of server-side resources used by AWP antivirus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.07 ▼2.49
Dashboard /wp-admin3.32 ▲0.0147.57 ▼1.35
Posts /wp-admin/edit.php3.37 ▲0.0149.61 ▲3.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.48 ▼3.23
Media Library /wp-admin/upload.php3.24 ▲0.0142.06 ▲6.57

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
wp_awp_lock
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for AWP antivirus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲12013.20 ▼1.192.40 ▲0.5042.99 ▼6.77
Dashboard /wp-admin2,233 ▲425.98 ▲0.0997.10 ▼17.5066.97 ▲18.21
Posts /wp-admin/edit.php2,115 ▲262.05 ▼0.0133.72 ▼2.7936.30 ▲1.83
Add New Post /wp-admin/post-new.php1,692 ▲17822.28 ▲4.58656.87 ▲8.0752.12 ▼12.16
Media Library /wp-admin/upload.php1,406 ▲154.23 ▲0.07100.18 ▲4.1475.77 ▲28.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • wp_awp_lock
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
Please take inspiration from this readme.txt

awp-antivirus/AWP-antivirus.php 92% from 13 tests

The primary PHP file in "AWP antivirus" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awp-antivirus.php" instead of "AWP-antivirus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected956 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP517020650
PO File2112124306

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity100.00
▷ Minimum class complexity100.00
▷ Maximum class complexity100.00
Average method complexity7.19
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/error.png4.24KB1.48KB▼ 65.18%
images/check.png2.15KB1.37KB▼ 36.57%
images/valid.png4.33KB1.51KB▼ 65.15%
images/icone.png1.66KB0.91KB▼ 45.07%
images/info.png4.30KB1.51KB▼ 64.82%