10% ldap-authentication-2

Code Review | LDAP Authentication 2

WordPress plugin LDAP Authentication 2 scored10%from 54 tests.

About plugin

  • Plugin page: ldap-authenticati...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Dec 20, 2012
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: OrbitaNET (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,638 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/ldap-authentication-2/simple-ldap-authentication.php+96
    syntax error, unexpected '&', expecting ')'

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

A check of server-side resources used by LDAP Authentication 2
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.41 ▼1.88
Dashboard /wp-admin3.31 ▲0.0049.56 ▼2.25
Posts /wp-admin/edit.php3.36 ▲0.0054.32 ▲4.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.38 ▼17.43
Media Library /wp-admin/upload.php3.23 ▲0.0038.66 ▲1.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LDAP Authentication 2
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.531.86 ▼0.0652.06 ▲5.85
Dashboard /wp-admin2,198 ▲215.58 ▼0.0092.01 ▼8.7940.45 ▼2.24
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0240.68 ▲5.2636.02 ▼0.64
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▲0.03628.36 ▼26.1150.66 ▼11.08
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.01109.38 ▲1.3547.81 ▲4.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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
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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected '&', expecting ')' in wp-content/plugins/ldap-authentication-2/simple-ldap-authentication.php on line 96

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (/trunc/screenshot1.png.)
You can take inspiration from this readme.txt

ldap-authentication-2/simple-ldap-authentication.php 92% from 13 tests

The main PHP file in "LDAP Authentication 2" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ldap-authentication-2.php" instead of "simple-ldap-authentication.php")

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
Success! There were no dangerous files found in this plugin940 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13979553
PO File14042179
JavaScript112111
CSS118197

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity98.00
▷ Minimum class complexity98.00
▷ Maximum class complexity98.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
1 PNG file occupies 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png188.61KB67.30KB▼ 64.32%