83% id4me

Code Review | ID4me

WordPress plugin ID4me scored 83% from 54 tests.

About plugin

  • Plugin page: id4me
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: May 7, 2019
  • Latest release: Jun 22, 2021
  • Number of updates: 10
  • Update frequency: every 81.9 days
  • Top authors: ionos (80%)gdespoulain (30%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 684 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼147.49ms] Passed 4 tests

Server-side resources used by ID4me
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1541.38 ▲17.02
Dashboard /wp-admin3.16 ▲0.1047.63 ▲1.58
Posts /wp-admin/edit.php3.20 ▲0.1047.10 ▼2.52
Add New Post /wp-admin/post-new.php5.45 ▲0.0296.68 ▼577.91
Media Library /wp-admin/upload.php3.04 ▲0.0336.36 ▼11.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 223 new files
Database: 1 new table, 1 new option
New tables
wp_id4me_authorities
New WordPress options
id4me_version

Browser metrics Passed 4 tests

A check of browser resources used by ID4me
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,832 ▲23615.94 ▲0.6114.33 ▲5.3754.05 ▼3.77
Dashboard /wp-admin2,973 ▲395.89 ▼0.22145.11 ▼10.78125.91 ▼3.12
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0070.75 ▲0.4898.40 ▼8.71
Add New Post /wp-admin/post-new.php1,672 ▼1119.10 ▲0.43413.00 ▲0.43119.80 ▲4.93
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.02150.65 ▼37.71126.02 ▼19.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • id4me_version

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 130× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Id4me\\RP\\Exception\\ValidationException' not found in wp-content/plugins/id4me/vendor/id4me/id4me-rp/src/Exception/InvalidAuthorityIssuerException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/id4me/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (ID4me login screen), #2 (ID4me setup screen)
Please take inspiration from this readme.txt

id4me/id4me.php 92% from 13 tests

The entry point to "ID4me" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin27,434 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PHP1834,72514,63925,881
JSON400503
JavaScript24911375
CSS202207
LESS220177
Markdown4680145
SVG42174
YAML23033
Dockerfile15120
XML10019

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity23.52
▷ Minimum class complexity1.00
▷ Maximum class complexity633.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces16
Interfaces1
Traits0
Classes172
▷ Abstract classes31.74%
▷ Concrete classes16998.26%
▷ Final classes00.00%
Methods1,067
▷ Static methods393.66%
▷ Public methods99793.44%
▷ Protected methods383.56%
▷ Private methods323.00%
Functions26
▷ Named functions1869.23%
▷ Anonymous functions830.77%
Constants206
▷ Global constants2110.19%
▷ Class constants18589.81%
▷ Public constants185100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.34MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/id4me/id4me-rp/images/architecture.png60.13KB22.90KB▼ 61.91%
screenshot-2.png25.80KB7.78KB▼ 69.83%
assets/img/id4me-logo.png1.37KB0.58KB▼ 57.90%
assets/screenshots/readme-register-form.png27.88KB10.95KB▼ 60.74%
assets/screenshots/readme-register-data.png59.52KB20.61KB▼ 65.38%