78% almefy-me

Code Review | ALMEFY: Two-Factor Authentication in one step. Without password​

WordPress plugin ALMEFY: Two-Factor Authentication in one step. Without password​ scored78%from 54 tests.

About plugin

  • Plugin page: almefy-me
  • Plugin version: 0.16.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2022
  • Latest release: May 25, 2023
  • Number of updates: 28
  • Update frequency: every 13.7 days
  • Top authors: almefyme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,050 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.52MB] [CPU: ▼1.94ms] Passed 4 tests

Server-side resources used by ALMEFY: Two-Factor Authentication in one step. Without password​
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4839.83 ▲2.02
Dashboard /wp-admin3.85 ▲0.5561.77 ▲8.08
Posts /wp-admin/edit.php3.90 ▲0.5453.92 ▼3.15
Add New Post /wp-admin/post-new.php6.42 ▲0.5389.10 ▼13.44
Media Library /wp-admin/upload.php3.77 ▲0.5442.51 ▲6.82

Server storage [IO: ▲4.92MB] [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: 144 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for ALMEFY: Two-Factor Authentication in one step. Without password​
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,440 ▲69413.63 ▼0.812.82 ▲1.2242.33 ▲3.82
Dashboard /wp-admin2,613 ▲4225.90 ▲0.00106.19 ▲3.3541.73 ▲0.09
Posts /wp-admin/edit.php2,503 ▲4142.10 ▲0.0940.53 ▲4.8731.97 ▼4.72
Add New Post /wp-admin/post-new.php1,568 ▲2623.13 ▲5.01689.05 ▲67.9051.61 ▼0.10
Media Library /wp-admin/upload.php1,801 ▲4134.30 ▲0.0098.51 ▼5.4843.24 ▼1.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/almefy-me/src/Mail/connect_device_template.php
    • > /wp-content/plugins/almefy-me/src/Pages/Settings/icon.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Almefy\\Exception\\TransportException' not found in wp-content/plugins/almefy-me/vendor/almefy/sdk/src/Exception/NetworkException.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Almefy\\Exception\\TransportException' not found in wp-content/plugins/almefy-me/vendor/almefy/client/src/Exception/NetworkException.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/almefy-me/src/Pages/Settings/tab_03_howtouse.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Almefy\\Exception\\TransportException' not found in wp-content/plugins/almefy-me/vendor/almefy/client/src/Exception/ServerException.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_settings_fields() in wp-content/plugins/almefy-me/src/Pages/Settings/tab_02_settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Almefy\\Exception\\TransportException' not found in wp-content/plugins/almefy-me/vendor/almefy/sdk/src/Exception/ServerException.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/almefy-me/src/Pages/Settings/tab_01_keysecret.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: login, signin, authentication, two-factor-authentication

almefy-me/plugin.php 92% from 13 tests

The primary PHP file in "ALMEFY: Two-Factor Authentication in one step. Without password​" version 0.16.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("almefy-me.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected9,853 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
PHP581,1431,3164,382
SVG1435213,680
PO File2254308814
CSS1011619472
Markdown2760198
JavaScript363291184
JSON400123

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.71
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes41
▷ Abstract classes00.00%
▷ Concrete classes41100.00%
▷ Final classes00.00%
Methods222
▷ Static methods3917.57%
▷ Public methods19487.39%
▷ Protected methods73.15%
▷ Private methods219.46%
Functions63
▷ Named functions23.17%
▷ Anonymous functions6196.83%
Constants23
▷ Global constants00.00%
▷ Class constants23100.00%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/qr-play-store.png10.02KB5.07KB▼ 49.45%
assets/img/qr-app-store.png9.92KB5.11KB▼ 48.45%
assets/img/si.png23.12KB9.48KB▼ 58.99%
assets/img/qr.png12.76KB5.99KB▼ 53.08%
assets/img/getapple.png2.44KB1.31KB▼ 46.46%