72% identity-verification-for-woocommerce

Code Review | Real ID: Identity Verification for WooCommerce

WordPress plugin Real ID: Identity Verification for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: identity-verifica...
  • Plugin version: 1.8.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Sep 14, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 86
  • Update frequency: every 9.3 days
  • Top authors: verdictapps (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /10,482 total downloads

Benchmarks

Plugin footprint 82% from 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.58MB] [CPU: ▲334.92ms] 75% from 4 tests

Analyzing server-side resources used by Real ID: Identity Verification for WooCommerce
It is recommended to improve the following
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 334.92ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.55507.61 ▲469.60
Dashboard /wp-admin3.87 ▲0.57387.36 ▲338.17
Posts /wp-admin/edit.php3.98 ▲0.63395.61 ▲349.96
Add New Post /wp-admin/post-new.php6.96 ▲1.07412.39 ▲329.75
Media Library /wp-admin/upload.php3.79 ▲0.56354.60 ▲321.81

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 932 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Real ID: Identity Verification for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,446 ▼31614.30 ▼0.410.54 ▼1.1418.11 ▼28.58
Dashboard /wp-admin2,197 ▲175.57 ▼0.0790.60 ▼9.1841.36 ▼1.78
Posts /wp-admin/edit.php2,102 ▲21.92 ▼0.0538.87 ▼5.0734.43 ▼3.82
Add New Post /wp-admin/post-new.php1,527 ▼721.10 ▼4.05662.05 ▲61.4361.54 ▲0.59
Media Library /wp-admin/upload.php1,399 ▲24.15 ▼0.07109.84 ▲6.0445.37 ▲2.00

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 472× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/php-di/php-di/src/Definition/Resolver/DecoratorResolver.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/yohang/finite/tests/Finite/Test/Event/TransitionEventTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'DI\\Container' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/php-di/php-di/src/CompiledContainer.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/yohang/finite/tests/Finite/Test/Event/Callback/CallbackSpecificationTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractSyslogHandler' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Finite\\Transition\\PropertiesAwareTransitionInterface' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/yohang/finite/src/Finite/Transition/Transition.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/identity-verification-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: id checks, fraud prevention, id verification, woocommerce, age restriction

identity-verification-for-woocommerce/realid.php 69% from 13 tests

The main PHP script in "Real ID: Identity Verification for WooCommerce" version 1.8.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("identity-verification-for-woocommerce.php" instead of "realid.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "3.0")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/identity-verification-for-woocommerce/vendor/yohang/finite/docs/make.bat
79,404 lines of code in 872 files:
LanguageFilesBlank linesComment linesLines of code
PHP72611,59523,21261,980
JavaScript663384619,075
Markdown191,16603,787
JSON33003,653
DOS Batch1342227
SVG1001182
make1306156
reStructuredText6215419152
XML4175100
Python17417844
YAML35033
CSS12410
HTML1205

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity10.23
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces130
Interfaces103
Traits8
Classes577
▷ Abstract classes244.16%
▷ Concrete classes55395.84%
▷ Final classes11721.16%
Methods3,565
▷ Static methods2998.39%
▷ Public methods2,91781.82%
▷ Protected methods2597.27%
▷ Private methods38910.91%
Functions484
▷ Named functions23949.38%
▷ Anonymous functions24550.62%
Constants337
▷ Global constants236.82%
▷ Class constants31493.18%
▷ Public constants24578.03%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 2.21MB with 1.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-6.png196.59KB73.15KB▼ 62.79%
.wordpress-org/icon-128x128.png5.24KB3.63KB▼ 30.86%
.wordpress-org/banner-1544x500.png191.56KB72.78KB▼ 62.01%
.wordpress-org/screenshot-1.png637.17KB213.76KB▼ 66.45%
.wordpress-org/screenshot-4.png141.32KB51.58KB▼ 63.50%