78% erident-custom-login-and-dashboard

Code Review | Erident Custom Login and Dashboard

WordPress plugin Erident Custom Login and Dashboard scored78%from 54 tests.

About plugin

  • Plugin page: erident-custom-lo...
  • Plugin version: 4.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 27, 2012
  • Latest release: Nov 30, 2023
  • Number of updates: 98
  • Update frequency: every 42.3 days
  • Top authors: libinvbabu (80.61%)davidvongries (20.41%)

Code review

54 tests

User reviews

150 reviews

Install metrics

10,000+ active /511,733 total downloads

Benchmarks

Plugin footprint 83% 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.28MB] [CPU: ▼5.01ms] Passed 4 tests

This is a short check of server-side resources used by Erident Custom Login and Dashboard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2738.36 ▼5.18
Dashboard /wp-admin3.64 ▲0.2952.94 ▼12.09
Posts /wp-admin/edit.php3.69 ▲0.3347.84 ▲1.92
Add New Post /wp-admin/post-new.php6.18 ▲0.2895.45 ▼4.69
Media Library /wp-admin/upload.php3.50 ▲0.2639.28 ▲7.53
Custom Login & Dashboard /wp-admin/options-general.php?page=erident-custom-login-and-dashboard3.6240.02

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
plugin_erident_settings
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Erident Custom Login and Dashboard: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲15914.68 ▲0.371.87 ▲0.0127.47 ▼20.46
Dashboard /wp-admin2,307 ▲1275.80 ▲0.2094.53 ▲4.6178.04 ▲39.08
Posts /wp-admin/edit.php2,245 ▲1452.38 ▲0.3640.93 ▲6.2336.32 ▲3.42
Add New Post /wp-admin/post-new.php1,808 ▲28222.44 ▼0.65702.54 ▲104.4428.87 ▼19.20
Media Library /wp-admin/upload.php1,531 ▲1314.21 ▲0.08102.31 ▼8.8286.71 ▲34.04
Custom Login & Dashboard /wp-admin/options-general.php?page=erident-custom-login-and-dashboard3,7865.29158.48104.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • plugin_erident_settings
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 21× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/setting-boxes/dashboard-settings.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/setting-boxes/review.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/ajax/class-reset-settings.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/setting-boxes/login-form-label-settings.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/settings-template.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/setting-boxes/login-form-link-settings.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/setting-boxes/import-settings.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/templates/setting-boxes/export-settings.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/inc/login.css.php
    • > /wp-content/plugins/erident-custom-login-and-dashboard/ajax/class-save-settings.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/erident-custom-login-and-dashboard/er-custom-login.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

erident-custom-login-and-dashboard/er-custom-login.php 92% from 13 tests

The main file in "Erident Custom Login and Dashboard" v. 4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("erident-custom-login-and-dashboard.php" instead of "er-custom-login.php")

Code Analysis 97% from 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
There were no executable files found in this plugin7,207 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP388061,2053,207
PO File77491,6092,419
JavaScript3199237815
CSS315286694
JSON20072

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity27.77
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods105
▷ Static methods2523.81%
▷ Public methods8278.10%
▷ Protected methods1514.29%
▷ Private methods87.62%
Functions19
▷ Named functions526.32%
▷ Anonymous functions1473.68%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.24MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/default-logo.png34.28KB6.49KB▼ 81.06%
assets/images/erident-logo.png34.28KB6.49KB▼ 81.06%
assets/images/before-after.png158.85KB47.65KB▼ 70.01%
assets/images/logo.png15.87KB6.29KB▼ 60.37%