10% d-login

Code Review | D-login

WordPress plugin D-login scored10%from 54 tests.

About plugin

  • Plugin page: d-login
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Dec 15, 2012
  • Latest release: Dec 15, 2012
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: dytri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,424 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/d-login/includes/admin/widgets/DWidgetUserForm.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; DWidgetUserForm has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼55.21ms] Passed 4 tests

Server-side resources used by D-login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.01 ▼37.69
Dashboard /wp-admin2.12 ▼1.185.89 ▼47.83
Posts /wp-admin/edit.php2.12 ▼1.236.72 ▼42.81
Add New Post /wp-admin/post-new.php2.12 ▼3.779.28 ▼92.50
Media Library /wp-admin/upload.php2.12 ▼1.116.41 ▼27.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for D-login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.48 ▲0.061.98 ▼0.0242.98 ▼2.16
Dashboard /wp-admin2,206 ▲214.86 ▼1.06109.50 ▲10.4940.66 ▼5.93
Posts /wp-admin/edit.php2,089 ▲142.02 ▲0.0539.62 ▼4.1634.20 ▼1.33
Add New Post /wp-admin/post-new.php1,542 ▼018.14 ▲0.17601.62 ▼6.0262.75 ▲12.77
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.0197.29 ▼14.2343.43 ▲0.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/d-login/includes/admin/widgets/DWidgetUserForm.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; DWidgetUserForm has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_dwidgetuserdisplay
    • theysaidso_admin_options
    • widget_dwidgetuserform
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/d-login/lib/cool-php-captcha/captcha.php
    • > /wp-content/plugins/d-login/lib/cool-php-captcha/example-form.php
    • > /wp-content/plugins/d-login/lib/cool-php-captcha/resources/tools/dictionary-import/importwords.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/d-login/includes/site/SiteDRegUser.php:22
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/d-login/includes/site/SiteDRegUser.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/d-login/lib/cool-php-captcha/resources/tools/dictionary-import/importwords.php on line 23
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/d-login/lib/cool-php-captcha/resources/tools/dictionary-import/importwords.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/d-login/includes/admin/widgets/DWidgetUserForm.php:12
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/d-login/includes/site/SiteDRegUser.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/d-login/includes/admin/widgets/DWidgetUserForm.php:12
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/d-login/includes/site/SiteDLoginUser.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/d-login/includes/admin/widgets/DWidgetUserDisplay.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/d-login/includes/site/SiteDLoginUser.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

d-login/d-login.php Passed 13 tests

"D-login" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
52 characters long description:
Plugin registration and authorization for Wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin951 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1038693,935821
PO File156158130

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.67
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1155.00%
▷ Protected methods945.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected