78% sb-login-page

Code Review | SB Login Page

WordPress plugin SB Login Page scored 78% from 54 tests.

About plugin

  • Plugin page: sb-login-page
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2014
  • Latest release: Apr 9, 2015
  • Number of updates: 15
  • Update frequency: every 11.5 days
  • Top authors: skylarkcob (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,095 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.01MB] [CPU: ▼5.02ms] Passed 4 tests

A check of server-side resources used by SB Login Page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.08 ▼4.38
Dashboard /wp-admin3.31 ▲0.0146.57 ▼4.22
Posts /wp-admin/edit.php3.36 ▲0.0144.99 ▼1.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.80 ▼10.17
Media Library /wp-admin/upload.php3.23 ▲0.0134.94 ▲3.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SB Login Page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.28 ▼1.091.68 ▼0.1043.59 ▼0.76
Dashboard /wp-admin2,212 ▲245.79 ▼0.1197.80 ▼19.4940.62 ▼5.32
Posts /wp-admin/edit.php2,076 ▼102.04 ▼0.0234.80 ▼0.4835.61 ▲0.89
Add New Post /wp-admin/post-new.php1,552 ▲3318.60 ▼4.50644.02 ▼22.9851.88 ▼8.55
Media Library /wp-admin/upload.php1,400 ▲94.21 ▼0.0197.00 ▼4.5943.28 ▼1.80

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sb-login-page/inc/content/content-page-login.php
    • > /wp-content/plugins/sb-login-page/inc/content/content-page-register.php
    • > /wp-content/plugins/sb-login-page/inc/content/content-page-lost-password.php
  • 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SB_User' not found in wp-content/plugins/sb-login-page/inc/content/content-page-account.php:5
    • > PHP Warning
      Use of undefined constant SB_LOGIN_PAGE_INC_PATH - assumed 'SB_LOGIN_PAGE_INC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sb-login-page/inc/content/content-page-lost-password.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sb-login-page/inc/module/module-lost-password.php:12
    • > PHP Warning
      require(SB_LOGIN_PAGE_INC_PATH/sb-plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/sb-login-page/inc/sb-plugin-load.php on line 2
    • > PHP Warning
      include(): Failed opening 'SB_LOGIN_PAGE_INC_PATH/module/module-lost-password.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sb-login-page/inc/content/content-page-lost-password.php on line 4
    • > PHP Warning
      include(SB_LOGIN_PAGE_INC_PATH/module/module-login.php): failed to open stream: No such file or directory in wp-content/plugins/sb-login-page/inc/content/content-page-login.php on line 4
    • > PHP Warning
      include(): Failed opening 'SB_LOGIN_PAGE_INC_PATH/module/module-register.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/sb-login-page/inc/content/content-page-register.php on line 4
    • > PHP Warning
      include(SB_LOGIN_PAGE_INC_PATH/module/module-lost-password.php): failed to open stream: No such file or directory in wp-content/plugins/sb-login-page/inc/content/content-page-lost-password.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sb-login-page/inc/module/module-verify-email.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sb_login_page_signup_required_fields() in wp-content/plugins/sb-login-page/inc/module/module-register.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (The main option page for SB Login Page plugin.), #2 (The login form in Vietnamese.)
The official readme.txt is a good inspiration

sb-login-page/sb-login-page.php Passed 13 tests

The main file in "SB Login Page" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
SB Login Page is a plugin that allows user to custom WordPress login page.

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
Success! There were no dangerous files found in this plugin3,083 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP2295241,701
CSS4400609
JavaScript31515546
PO File1102113227

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions80
▷ Named functions80100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.60KB21.80KB▼ 54.21%
screenshot-2.png13.22KB6.53KB▼ 50.58%