64% rapid-secure-login

Code Review | RapID Secure Login

WordPress plugin RapID Secure Login scored64%from 54 tests.

About plugin

  • Plugin page: rapid-secure-login
  • Plugin version: 2.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Apr 11, 2017
  • Latest release: Jan 19, 2023
  • Number of updates: 95
  • Update frequency: every 22.3 days
  • Top authors: intercede01 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /4,562 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.47MB] [CPU: ▲2.72ms] Passed 4 tests

This is a short check of server-side resources used by RapID Secure Login
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.07 ▲1.6166.32 ▲15.07
Dashboard /wp-admin4.78 ▲1.4356.66 ▼5.50
Posts /wp-admin/edit.php4.83 ▲1.4759.00 ▲7.29
Add New Post /wp-admin/post-new.php7.38 ▲1.4997.46 ▼3.69
Media Library /wp-admin/upload.php4.70 ▲1.4747.30 ▲12.78
RapID /wp-admin/options-general.php?page=rpsl-plugin-settings4.6145.43

Server storage [IO: ▲1.14MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 490 new files
Database: 4 new tables, 7 new options
New tables
wp_rpsl_certificates
wp_rpsl_devices
wp_rpsl_config
wp_rpsl_sessions
New WordPress options
widget_recent-comments
rpsl_plugin_db_version_number
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by RapID Secure Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲18413.44 ▼1.158.13 ▲5.9844.02 ▼8.02
Dashboard /wp-admin2,201 ▲245.59 ▼0.0790.67 ▼11.3539.52 ▼5.00
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0035.54 ▼3.6133.29 ▼4.94
Add New Post /wp-admin/post-new.php1,542 ▲1618.04 ▼5.03608.51 ▼39.9779.17 ▲15.44
Media Library /wp-admin/upload.php1,409 ▲94.18 ▲0.0297.31 ▼13.7441.65 ▼2.77
RapID /wp-admin/options-general.php?page=rpsl-plugin-settings9382.1127.9527.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_rpsl_config
    • wp_rpsl_sessions
    • wp_rpsl_devices
    • wp_rpsl_certificates
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • rpsl_plugin_db_version_number

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/rapid-secure-login/includes/httpful/Handlers/CsvHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/rapid-secure-login/includes/httpful/Handlers/FormHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rapid-secure-login/rpsl_direct_enrolment.php:322
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Httpful\\plugin_dir_path() in wp-content/plugins/rapid-secure-login/includes/httpful/Bootstrap.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rapid-secure-login/rpsl_login.php:172
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/rapid-secure-login/includes/httpful/Handlers/XmlHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/rapid-secure-login/includes/httpful/Handlers/JsonHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/rapid-secure-login/includes/httpful/Handlers/XHtmlHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rapid-secure-login/rpsl_authenticate.php:282
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rapid-secure-login/rpsl_my_devices.php:281

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: login, authentication, security, 2 factor authentication, 2fa...

rapid-secure-login/rpsl_main.php 85% from 13 tests

The main PHP script in "RapID Secure Login" version 2.0.15 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rapid-secure-login.php" instead of "rpsl_main.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/rapid-secure-login/includes/phpqrcode/tools/merge.bat
13,330 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP553,1874,10912,747
JavaScript46921362
SVG101128
CSS113153
Markdown18036
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.50
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes70
▷ Abstract classes00.00%
▷ Concrete classes70100.00%
▷ Final classes11.43%
Methods653
▷ Static methods22234.00%
▷ Public methods53481.78%
▷ Protected methods9714.85%
▷ Private methods223.37%
Functions124
▷ Named functions12399.19%
▷ Anonymous functions10.81%
Constants158
▷ Global constants13082.28%
▷ Class constants2817.72%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
49 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/phpqrcode/cache/frame_9.png0.19KB0.19KB▼ 2.01%
images/qr2_164.png2.25KB0.47KB▼ 79.32%
images/qr2_180.png2.55KB0.53KB▼ 79.28%
includes/phpqrcode/cache/frame_2.png0.14KB0.14KB▼ 2.08%
includes/phpqrcode/cache/frame_21.png0.23KB0.22KB▼ 3.83%