64% wp-ldap

Code Review | WP-LDAP

WordPress plugin WP-LDAP scored64%from 54 tests.

About plugin

  • Plugin page: wp-ldap
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: ([0-9.]+)$/', $line, $m);-4.7.5
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: May 25, 2017
  • Number of updates: 7
  • Update frequency: every 4.0 days
  • Top authors: meitar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,251 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by WP-LDAP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.34 ▲4.22
Dashboard /wp-admin3.31 ▲0.0044.60 ▼3.00
Posts /wp-admin/edit.php3.36 ▲0.0045.80 ▼4.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.85 ▼6.30
Media Library /wp-admin/upload.php3.23 ▲0.0033.64 ▼3.98

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP-LDAP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.154.86 ▲2.9347.91 ▼0.25
Dashboard /wp-admin2,200 ▲125.83 ▲0.90100.11 ▲0.1139.48 ▼4.33
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0637.92 ▼4.7334.89 ▼0.77
Add New Post /wp-admin/post-new.php1,542 ▲1118.78 ▲0.43672.26 ▲77.2368.94 ▲22.02
Media Library /wp-admin/upload.php1,391 ▼04.27 ▲0.0797.17 ▲1.8242.21 ▲0.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/wp-ldap/uninstall.php+17
    Uncaught Error: Call to undefined function get_networks() in wp-content/plugins/wp-ldap/uninstall.php:17
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 10 files (0.07MB) in the plugin directory
    • (new file) includes/class-wp-ldap-api.php
    • (new file) includes/class-wp-ldap-search-result.php
    • (new file) wp-ldap.php
    • (new file) includes/class-wp-ldap-user.php
    • (new file) uninstall.php
    • (new file) LICENSE
    • (new file) readme.txt
    • (new file) admin/network-settings.php
    • (new file) README.markdown
    • (new file) index.php
  • Zombie WordPress options were found after uninstall: 7 options
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_LDAP\\plugin_dir_path() in wp-content/plugins/wp-ldap/wp-ldap.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_network_option() in wp-content/plugins/wp-ldap/admin/network-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: users, administration, multisite, ldap

wp-ldap/wp-ldap.php 85% from 13 tests

The main file in "WP-LDAP" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "([0-9.]+)$/', $line, $m);")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin441 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP776388429
Markdown17012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods2052.63%
▷ Public methods3592.11%
▷ Protected methods00.00%
▷ Private methods37.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin