72% custom-styled-wp-login-page

Code Review | Custom Styled WP Login Page

WordPress plugin Custom Styled WP Login Page scored72%from 54 tests.

About plugin

  • Plugin page: custom-styled-wp-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2019
  • Latest release: Jun 6, 2019
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: itzpradip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.17MB] [CPU: ▼24.77ms] Passed 4 tests

Server-side resources used by Custom Styled WP Login Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.69 ▼1.48
Dashboard /wp-admin3.13 ▼0.2125.86 ▼40.57
Posts /wp-admin/edit.php3.27 ▼0.0933.23 ▼11.16
Add New Post /wp-admin/post-new.php5.51 ▼0.3867.99 ▼34.67
Media Library /wp-admin/upload.php3.22 ▼0.0126.91 ▼12.66
Login Page Settings /wp-admin/options-general.php?page=mtcs_login_settings3.2832.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Styled WP Login Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.141.69 ▲0.0839.02 ▲1.00
Dashboard /wp-admin2,202 ▲285.67 ▲0.0989.41 ▲3.9440.73 ▼0.97
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0439.42 ▲2.3535.99 ▲0.49
Add New Post /wp-admin/post-new.php1,534 ▼322.92 ▲4.50654.19 ▼0.3454.11 ▼19.38
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.2094.40 ▼19.8345.86 ▼1.68
Login Page Settings /wp-admin/options-general.php?page=mtcs_login_settings1,5784.0177.7924.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=mtcs_login_settings
    • > Notice in wp-content/plugins/custom-styled-wp-login-page/classes/menu.class.php+32
    Undefined variable: message
    • > GET request to /wp-admin/options-general.php?page=mtcs_login_settings
    • > Notice in wp-content/plugins/custom-styled-wp-login-page/classes/settings.class.php+61
    Undefined variable: logo_element

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-styled-wp-login-page/index.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=mtcs_login_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/custom-styled-wp-login-page/assets/custom.js?ver=6.3.1:6:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=mtcs_login_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

custom-styled-wp-login-page/index.php 85% from 13 tests

Analyzing the main PHP file in "Custom Styled WP Login Page" version 1.1.0
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-styled-wp-login-page.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin318 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37673296
JavaScript11717
CSS1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.50
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin