88% reve-secure

Code Review | REVE Secure Two Factor Authentication (2FA)

WordPress plugin REVE Secure Two Factor Authentication (2FA) scored 88% from 54 tests.

About plugin

  • Plugin page: reve-secure
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 5.8.1
  • First release: May 16, 2018
  • Latest release: May 29, 2018
  • Number of updates: 13
  • Update frequency: every 1.1 days
  • Top authors: revesecure (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 494 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼140.51ms] Passed 4 tests

An overview of server-side resources used by REVE Secure Two Factor Authentication (2FA)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2337.96 ▲16.92
Dashboard /wp-admin3.18 ▲0.1247.78 ▲1.21
Posts /wp-admin/edit.php3.29 ▲0.1844.07 ▼3.63
Add New Post /wp-admin/post-new.php5.53 ▲0.1091.98 ▼560.37
Media Library /wp-admin/upload.php3.12 ▲0.1132.01 ▲0.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

REVE Secure Two Factor Authentication (2FA): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.73 ▲0.1210.69 ▲1.4349.50 ▼2.35
Dashboard /wp-admin2,982 ▲515.97 ▼0.12138.58 ▼9.03137.97 ▲7.70
Posts /wp-admin/edit.php2,759 ▲202.59 ▼0.1262.22 ▼5.2192.74 ▼6.14
Add New Post /wp-admin/post-new.php1,628 ▼5521.48 ▲2.80279.09 ▼93.09114.91 ▲0.73
Media Library /wp-admin/upload.php1,770 ▼405.03 ▼0.01132.32 ▼17.92143.47 ▲18.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% 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 0% from 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/reve-secure/Revesecure.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/reve-secure/templates/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/reve-secure/inc/RevesecureSettingsMenu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function login_header() in wp-content/plugins/reve-secure/templates/second.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
The official readme.txt might help

reve-secure/Revesecure.php 92% from 13 tests

The principal PHP file in "REVE Secure Two Factor Authentication (2FA)" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("reve-secure.php" instead of "Revesecure.php")

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,417 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP79438772
JavaScript24638511
CSS200132
SVG2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity46.00
▷ Minimum class complexity18.00
▷ Maximum class complexity74.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods1030.30%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
templates/img/secureLogo.png1.14KB0.44KB▼ 61.63%