74% loginstyle

Code Review | Loginstyle

WordPress plugin Loginstyle scored74%from 54 tests.

About plugin

  • Plugin page: loginstyle
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2016
  • Latest release: Jun 16, 2016
  • Number of updates: 10
  • Update frequency: every 6.3 days
  • Top authors: archtheme (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /4,486 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.23MB] [CPU: ▼7.42ms] Passed 4 tests

This is a short check of server-side resources used by Loginstyle
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2439.30 ▲4.85
Dashboard /wp-admin3.54 ▲0.2044.54 ▼15.17
Posts /wp-admin/edit.php3.65 ▲0.3048.78 ▲3.86
Add New Post /wp-admin/post-new.php6.12 ▲0.2482.58 ▼21.04
Media Library /wp-admin/upload.php3.47 ▲0.2437.10 ▲2.67
Loginstyle /wp-admin/themes.php?page=loginstyle-settings6.5246.30

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 86 new files
Database: no new tables, 7 new options
New WordPress options
loginstyle_version
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Loginstyle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲3413.34 ▼1.041.76 ▼0.2342.91 ▲1.81
Dashboard /wp-admin2,213 ▲215.86 ▲0.9794.72 ▼9.9139.45 ▼3.86
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0239.71 ▲0.4935.40 ▲2.04
Add New Post /wp-admin/post-new.php1,531 ▲1223.08 ▼0.12682.30 ▲29.5859.61 ▲7.28
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.06102.19 ▲2.5543.24 ▼0.20
Loginstyle /wp-admin/themes.php?page=loginstyle-settings12,0865.76253.6576.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/loginstyle/loginstyle.php+80
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • loginstyle_version
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loginstyle/public/loginstyle-public.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/loginstyle/loginstyle.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loginstyle/admin/loginstyle-admin.php:385
    • > PHP Warning
      Use of undefined constant LOGINSTYLE_URL - assumed 'LOGINSTYLE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/loginstyle/admin/partials/loginstyle-admin-settings-display.php on line 5
    • > PHP Warning
      Use of undefined constant LOGINSTYLE_URL - assumed 'LOGINSTYLE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/loginstyle/admin/partials/loginstyle-admin-settings-display.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/loginstyle/admin/partials/loginstyle-admin-settings-display.php:11
    • > PHP Warning
      Use of undefined constant LOGINSTYLE_NAME - assumed 'LOGINSTYLE_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/loginstyle/admin/partials/loginstyle-admin-settings-display.php on line 9
    • > PHP Warning
      Use of undefined constant LOGINSTYLE_URL - assumed 'LOGINSTYLE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/loginstyle/admin/partials/loginstyle-admin-settings-display.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Tags: Please reduce the number of tags, currently 29 tag instead of maximum 10
You can look at the official readme.txt

loginstyle/loginstyle.php Passed 13 tests

The main file in "Loginstyle" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Beautify, brand and customize your WordPress Admin login page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin18,927 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JSON150013,979
PHP4224832,450
JavaScript8251505893
PO File1324474717
CSS17475712
SVG100176

PHP code Passed 2 tests

A brief analysis 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.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
35 compressed PNG files occupy 1.77MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/templates/gorilla.png102.13KB110.63KB0.00%
admin/imgs/transparency-grid.png2.58KB2.80KB0.00%
admin/templates/chimera.png10.22KB10.57KB0.00%
admin/imgs/labyrinth-logo.png3.54KB3.77KB0.00%
admin/templates/labyrinth.png87.19KB94.21KB0.00%