10% csh-login

Code Review | CSH Login

WordPress plugin CSH Login scored10%from 54 tests.

About plugin

  • Plugin page: csh-login
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Aug 25, 2017
  • Latest release: Mar 29, 2018
  • Number of updates: 20
  • Update frequency: every 10.9 days
  • Top authors: cmssuperheroes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /12,463 total downloads

Benchmarks

Plugin footprint 40% 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
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/csh-login/core/widget-show-login-form.php+5
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.23ms] Passed 4 tests

Server-side resources used by CSH Login
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.78 ▼33.69
Dashboard /wp-admin2.05 ▼1.266.07 ▼42.57
Posts /wp-admin/edit.php2.05 ▼1.316.66 ▼40.69
Add New Post /wp-admin/post-new.php2.05 ▼3.846.44 ▼91.96
Media Library /wp-admin/upload.php2.05 ▼1.185.04 ▼30.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_login
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CSH Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,213 ▲47816.38 ▲1.9921.38 ▲19.5442.83 ▼12.89
Dashboard /wp-admin2,360 ▲1756.61 ▲0.71133.58 ▲26.8278.99 ▲36.20
Posts /wp-admin/edit.php2,284 ▲1953.56 ▲1.5154.52 ▲19.2573.56 ▲38.97
Add New Post /wp-admin/post-new.php1,699 ▲18522.46 ▲4.97633.53 ▼38.5638.22 ▼17.85
Media Library /wp-admin/upload.php1,423 ▲354.32 ▲0.0788.94 ▼21.4582.18 ▲30.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/csh-login/core/widget-show-login-form.php+5
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_login

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csh-login/inc/register-scripts.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csh-login/core/widget-show-login-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csh-login/core/declare-hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/csh-login/csh-login.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'NtqAdminSetting\\AdminSettings' not found in wp-content/plugins/csh-login/core/add-fields-admin-setting.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #3 is missing in csh-login/assets to your readme.txt
The official readme.txt is a good inspiration

csh-login/csh-login.php 92% from 13 tests

The principal PHP file in "CSH Login" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,454 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP620580982
JavaScript23524361
CSS3220111

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity26.00
▷ Minimum class complexity10.00
▷ Maximum class complexity42.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods16.67%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.23MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/facebook.png2.33KB1.58KB▼ 32.16%
assets/img/wordpress_edited_01.png18.61KB7.26KB▼ 61.01%
assets/img/toggle_tabs.png0.35KB0.35KB0.00%
assets/img/googleplus.png2.37KB1.72KB▼ 27.51%
assets/img/menu-icon.png1.19KB1.33KB0.00%