88% sitesassure-wp-malware-scanner

Code Review | Sitesassure WP Malware Scanner

WordPress plugin Sitesassure WP Malware Scanner scored 88% from 54 tests.

About plugin

  • Plugin page: sitesassure-wp-ma...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.9.6
  • WordPress version: 5.8.1
  • First release: Aug 14, 2015
  • Latest release: Aug 16, 2018
  • Number of updates: 32
  • Update frequency: every 34.4 days
  • Top authors: sitesassure (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 7,577 total downloads

Benchmarks

Plugin footprint 99% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲237.99ms] 50% from 4 tests

Server-side resources used by Sitesassure WP Malware Scanner
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 515.59ms on /wp-admin/admin.php?page=swms_scanner_purchase_page)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 237.99ms on /wp-admin/admin.php?page=swms_scanner_generate_report)
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.24446.82 ▲425.80
Dashboard /wp-admin3.25 ▲0.19430.60 ▲381.26
Posts /wp-admin/edit.php3.30 ▲0.20425.77 ▲371.52
Add New Post /wp-admin/post-new.php5.55 ▲0.12475.53 ▼183.82
Media Library /wp-admin/upload.php3.13 ▲0.13415.58 ▲383.01
Dashboard /wp-admin/admin.php?page=swms_scanner3.10416.72
Report /wp-admin/admin.php?page=swms_scanner_report_page3.11439.66
Submit Urls /wp-admin/admin.php?page=swms_scanner_submit_url3.10419.68
Purchase Firewall /wp-admin/admin.php?page=swms_scanner_purchase_page3.11515.59
FAQ / SUPPORT /wp-admin/admin.php?page=swms_scanner_faq_page3.11434.81
Generate Report /wp-admin/admin.php?page=swms_scanner_generate_report3.10442.34

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 2 new options
New tables
wp_swms_scanner_manage
New WordPress options
swms_quttera_api_url
swms_quttera_api

Browser metrics Passed 4 tests

An overview of browser requirements for Sitesassure WP Malware Scanner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,772 ▲17615.89 ▼0.028.11 ▼1.9052.33 ▲5.56
Dashboard /wp-admin3,022 ▲885.92 ▼0.15136.41 ▼36.63144.95 ▲19.03
Posts /wp-admin/edit.php2,798 ▲592.69 ▲0.0061.30 ▼10.9194.31 ▲0.37
Add New Post /wp-admin/post-new.php2,347 ▲84714.97 ▼3.86385.19 ▲20.57108.65 ▼4.12
Media Library /wp-admin/upload.php1,882 ▲724.98 ▼0.04122.43 ▼25.25125.76 ▲13.51
Dashboard /wp-admin/admin.php?page=swms_scanner1,1962.2155.6477.76
Report /wp-admin/admin.php?page=swms_scanner_report_page1,0842.0852.2657.53
Submit Urls /wp-admin/admin.php?page=swms_scanner_submit_url1,1492.1056.8179.32
Purchase Firewall /wp-admin/admin.php?page=swms_scanner_purchase_page1,1782.1054.0673.92
FAQ / SUPPORT /wp-admin/admin.php?page=swms_scanner_faq_page1,1802.0657.9456.52
Generate Report /wp-admin/admin.php?page=swms_scanner_generate_report1,1042.0852.1771.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sitesassure-wp-malware-scanner/sitesassure-wp-malware-scanner.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sitesassure-wp-malware-scanner/inc/swms_faq.php:8
    • > PHP Warning
      Use of undefined constant SWMS_PLUGIN_ASSETSPATH - assumed 'SWMS_PLUGIN_ASSETSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sitesassure-wp-malware-scanner/inc/swms_faq.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sitesassure-wp-malware-scanner/inc/swms_firewall.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/sitesassure-wp-malware-scanner/inc/swms_report.php:2
    • > PHP Warning
      Use of undefined constant SWMS_PLUGIN_ASSETSPATH - assumed 'SWMS_PLUGIN_ASSETSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sitesassure-wp-malware-scanner/inc/swms_firewall.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

sitesassure-wp-malware-scanner/sitesassure-wp-malware-scanner.php Passed 13 tests

"Sitesassure WP Malware Scanner" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
128 characters long description:
The Sitesassure WP Malware Scanner Plug-in provides manual malware scan reports: clean, malware, upgrade and blacklisted status.

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
Good job! No executable or dangerous file extensions detected3,300 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS425191,899
PHP64043718
SVG100565
JavaScript110615118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.96KB1.03KB0.00%
assets/images/logo.png17.22KB6.01KB▼ 65.08%
assets/images/css-tooltip-gradient-bg.png0.22KB0.34KB0.00%