10% next-active-directory-integration

Code Review | Next Active Directory Integration

WordPress plugin Next Active Directory Integration scored10%from 54 tests.

About plugin

  • Plugin page: next-active-direc...
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2016
  • Latest release: Nov 1, 2023
  • Number of updates: 121
  • Update frequency: every 21.6 days
  • Top authors: neosit (95.04%)tobi823 (4.13%)schakko (2.48%)

Code review

54 tests

User reviews

15 reviews

Install metrics

3,000+ active /121,692 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/next-active-directory-integration/vendor-repackaged/psr/log/src/LoggerInterface.php+30
    syntax error, unexpected '|', expecting variable (T_VARIABLE)

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.53ms] Passed 4 tests

Analyzing server-side resources used by Next Active Directory Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.46 ▼5.80
Dashboard /wp-admin3.31 ▲0.0043.98 ▼5.87
Posts /wp-admin/edit.php3.36 ▲0.0049.19 ▲0.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.61 ▼0.55
Media Library /wp-admin/upload.php3.23 ▲0.0036.41 ▼1.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 576 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Next Active Directory Integration: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.391.77 ▼0.2537.68 ▼4.78
Dashboard /wp-admin2,195 ▲145.63 ▼0.0790.13 ▼12.0338.76 ▼1.68
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0540.51 ▲3.5435.06 ▲2.51
Add New Post /wp-admin/post-new.php1,527 ▲121.30 ▼2.09622.09 ▼101.5260.70 ▲7.22
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0297.86 ▼6.0145.58 ▲0.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/next-active-directory-integration/autoload.php
    • > /wp-content/plugins/next-active-directory-integration/constants.php
    • > /wp-content/plugins/next-active-directory-integration/uninstall.php
    • > /wp-content/plugins/next-active-directory-integration/index.php
  • 286× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/twig/twig/src/TokenParser/UseTokenParser.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/twig/twig/src/Extension/StringLoaderExtension.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/twig/twig/src/TokenParser/BlockTokenParser.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Twig\ode\ode' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/twig/twig/src/Node/BodyNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/next-active-directory-integration/src/shared/Util/Logger/Handlers/FrontendLogHandler.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\\WordPress\\Multisite\\View\\Page\\PageAdapter' not found in wp-content/plugins/next-active-directory-integration/src/plug-in/Ui/NadiSingleSiteConfigurationPage.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Dreitier\adi\\Vendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Handler/SocketHandler.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

next-active-directory-integration/index.php 85% from 13 tests

This is the main PHP file of "Next Active Directory Integration" version 3.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("next-active-directory-integration.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 194 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin45,793 lines of code in 562 files:
LanguageFilesBlank linesComment linesLines of code
PHP4628,82820,67138,399
JavaScript547418013,045
PO File14675521,869
Twig33270291,261
Markdown31290570
CSS65826531
JSON300118

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.82
▷ Minimum class complexity1.00
▷ Maximum class complexity450.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces83
Interfaces25
Traits5
Classes419
▷ Abstract classes255.97%
▷ Concrete classes39494.03%
▷ Final classes6717.01%
Methods2,693
▷ Static methods2559.47%
▷ Public methods2,14079.47%
▷ Protected methods35313.11%
▷ Private methods2007.43%
Functions167
▷ Named functions12071.86%
▷ Anonymous functions4728.14%
Constants381
▷ Global constants256.56%
▷ Class constants35693.44%
▷ Public constants32992.42%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected