83% covr-multi-factor-authentication

Code Review | Covr Multi Factor Authentication

WordPress plugin Covr Multi Factor Authentication scored83%from 54 tests.

About plugin

  • Plugin page: covr-multi-factor...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.5.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2016
  • Latest release: May 15, 2018
  • Number of updates: 37
  • Update frequency: every 15.1 days
  • Top authors: covrsecurity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.10ms] Passed 4 tests

A check of server-side resources used by Covr Multi Factor Authentication
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.67 ▲1.00
Dashboard /wp-admin3.48 ▲0.1851.03 ▲1.41
Posts /wp-admin/edit.php3.59 ▲0.2448.98 ▲3.16
Add New Post /wp-admin/post-new.php6.06 ▲0.1783.93 ▼24.20
Media Library /wp-admin/upload.php3.40 ▲0.1736.12 ▲1.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 16 new options
New WordPress options
theysaidso_admin_options
covr_system_info
covr_seed
covr_login_button
covr_right_seed
can_compress_scripts
covr_force_login
db_upgraded
covr_success
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Covr Multi Factor Authentication
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.59 ▼0.781.70 ▼0.1042.67 ▲0.50
Dashboard /wp-admin2,216 ▲285.84 ▲0.94116.01 ▲12.1380.57 ▲38.69
Posts /wp-admin/edit.php2,114 ▲252.00 ▼0.0034.45 ▼2.0732.74 ▲0.98
Add New Post /wp-admin/post-new.php1,551 ▲2323.27 ▲4.73731.12 ▲126.1463.96 ▲14.51
Media Library /wp-admin/upload.php1,413 ▲314.09 ▼0.1195.45 ▼4.5770.24 ▲26.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • covr_saved_seed
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though no errors were found, 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/covr-multi-factor-authentication/includes/covr.admin.php:2

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in covr-multi-factor-authentication/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can look at the official readme.txt

covr-multi-factor-authentication/covrmain.php 92% from 13 tests

"Covr Multi Factor Authentication" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("covr-multi-factor-authentication.php" instead of "covrmain.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,311 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1315345891
JavaScript1328342
CSS211059
XML20016
SVG1003

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.19
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods24
▷ Static methods24100.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.21MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png48.16KB21.78KB▼ 54.77%
assets/screenshot-3.png75.87KB33.34KB▼ 56.05%
assets/screenshot-4.png29.67KB13.60KB▼ 54.15%
assets/icons/covr-wp-16x16.png0.45KB0.44KB▼ 2.80%
assets/screenshot-2.png61.02KB27.48KB▼ 54.97%