78% sanchari-login-styles

Code Review | Wordpress Login Styles

WordPress plugin Wordpress Login Styles scored78%from 54 tests.

About plugin

  • Plugin page: sanchari-login-st...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 16, 2014
  • Latest release: Nov 16, 2014
  • Number of updates: 14
  • Update frequency: N/A
  • Top authors: arnabkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.76ms] Passed 4 tests

A check of server-side resources used by Wordpress Login Styles
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.19 ▼2.39
Dashboard /wp-admin3.32 ▲0.0249.29 ▼2.01
Posts /wp-admin/edit.php3.37 ▲0.0246.44 ▲0.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.53 ▼14.39
Media Library /wp-admin/upload.php3.24 ▲0.0237.76 ▼0.24
/wp-admin/options-general.php?page=sls-settings3.2133.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Login Styles
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.60 ▼0.805.59 ▲3.9044.10 ▲0.52
Dashboard /wp-admin2,222 ▲345.96 ▼0.0899.27 ▼5.5739.04 ▲1.22
Posts /wp-admin/edit.php2,111 ▲222.04 ▲0.0736.35 ▼1.1434.11 ▲0.73
Add New Post /wp-admin/post-new.php1,548 ▲2923.17 ▲0.12635.41 ▲42.4654.01 ▲4.92
Media Library /wp-admin/upload.php1,404 ▲134.25 ▲0.1196.06 ▼3.8643.46 ▲0.47
/wp-admin/options-general.php?page=sls-settings8662.0324.7628.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sanchari-login-styles/inc/cmb/tests/phpunit/includes/bootstrap.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sanchari-login-styles/inc/options.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/sanchari-login-styles/inc/cmb/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-login-styles/css/style-login.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-login-styles/css/custom_styles.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sanchari-login-styles/inc/cmb/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-login-styles/sanchari-login-styles.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sanchari-login-styles/inc/cmb/init.php:41

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 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots need descriptions #2, #3 in sanchari-login-styles/assets to your readme.txt
Please take inspiration from this readme.txt

sanchari-login-styles/sanchari-login-styles.php Passed 13 tests

The entry point to "Wordpress Login Styles" version 1.0 is a PHP file that has certain tags in its header comment area
62 characters long description:
This plugin will enable colorful Custom Wordpress Login panel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected5,441 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript53124032,246
PHP136391,1452,241
CSS26121540
Markdown3890289
Bourne Shell115459
JSON10031
YAML15018
XML10117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity50.50
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods141
▷ Static methods3424.11%
▷ Public methods13998.58%
▷ Protected methods21.42%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
inc/cmb/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
inc/cmb/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%