10% flexible-frontend-login

Code Review | Flexible Frontend Login

WordPress plugin Flexible Frontend Login scored10%from 54 tests.

About plugin

  • Plugin page: flexible-frontend...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: Aug 23, 2013
  • Number of updates: 60
  • Update frequency: every 5.6 days
  • Top authors: palatino (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

300+ active /37,677 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
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/flexible-frontend-login/includes/widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; paw_ffl_widget has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼61.61ms] Passed 4 tests

Analyzing server-side resources used by Flexible Frontend Login
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.416.16 ▼37.86
Dashboard /wp-admin2.08 ▼1.278.30 ▼67.39
Posts /wp-admin/edit.php2.08 ▼1.288.33 ▼43.06
Add New Post /wp-admin/post-new.php2.08 ▼3.816.63 ▼98.12
Media Library /wp-admin/upload.php2.08 ▼1.157.17 ▼29.16
Flexible Frontend Login /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login2.086.98

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 72 new files
Database: no new tables, 8 new options
New WordPress options
flexible_frontend_login
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_paw_ffl_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flexible Frontend Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.65 ▼0.6011.06 ▲9.3843.43 ▼6.53
Dashboard /wp-admin2,207 ▲305.63 ▼0.09101.31 ▲8.2442.26 ▼2.41
Posts /wp-admin/edit.php2,112 ▲122.11 ▲0.1137.87 ▲1.3236.40 ▼1.20
Add New Post /wp-admin/post-new.php1,534 ▲623.02 ▼0.01653.21 ▲15.9059.08 ▲1.38
Media Library /wp-admin/upload.php1,418 ▲154.32 ▲0.15103.21 ▼0.5942.81 ▼2.52
Flexible Frontend Login /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login1,2222.1238.9046.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/flexible-frontend-login/includes/widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; paw_ffl_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • can_compress_scripts
    • flexible_frontend_login
    • widget_paw_ffl_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login
    • > Deprecated in wp-content/plugins/flexible-frontend-login/includes/widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; paw_ffl_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login
    • > Notice in wp-content/plugins/flexible-frontend-login/includes/options-page.php+243
    Undefined index: html_block
    • > GET request to /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in paw_ffl_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant FFL_PATH - assumed 'FFL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flexible-frontend-login/includes/options-page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flexible-frontend-login/includes/styling.php:4
    • > PHP Warning
      require_once(FFL_PATHincludes/classes/admin-page-class/admin-page-class.php): failed to open stream: No such file or directory in wp-content/plugins/flexible-frontend-login/includes/options-page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/flexible-frontend-login/includes/help.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/flexible-frontend-login/includes/output.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'FFL_PATHincludes/classes/admin-page-class/admin-page-class.php' (include_path='.:/usr/share/php') in wp-content/plugins/flexible-frontend-login/includes/options-page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'BF_Admin_Page_Class' not found in wp-content/plugins/flexible-frontend-login/includes/classes/class.AdminPageClassExtension.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/flexible-frontend-login/flexible-frontend-login.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flexible-frontend-login/includes/widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at apc_init (/wp-content/plugins/flexible-frontend-login/includes/classes/admin-page-class/js/Admin_Page_Class.js:49:22)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/flexible-frontend-login/includes/classes/admin-page-class/js/Admin_Page_Class.js:20:3)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:26990)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=options-general.php_flexible_frontend_login
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6 in flexible-frontend-login/assets to your readme.txt
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

flexible-frontend-login/flexible-frontend-login.php Passed 13 tests

The principal PHP file in "Flexible Frontend Login" v. 1.0.5 is loaded by WordPress automatically on each request
129 characters long description:
Adds a popup login form on any page or sidebar. Use shortcode [flexible-frontend-login] or template tag flexible_frontend_login()

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin13,051 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript158769467,081
PHP105321,5362,666
CSS113132742,032
PO File75728321,254
Smarty10018

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.34
Average class complexity98.25
▷ Minimum class complexity1.00
▷ Maximum class complexity378.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods138
▷ Static methods00.00%
▷ Public methods13597.83%
▷ Protected methods00.00%
▷ Private methods32.17%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/classes/admin-page-class/js/FancyCheckbox/images/firerift.png5.95KB2.13KB▼ 64.11%
includes/classes/admin-page-class/images/edit.png1.54KB1.38KB▼ 10.34%
includes/classes/admin-page-class/js/iphone-style-checkboxes/images/on.png2.44KB2.48KB0.00%
includes/classes/admin-page-class/js/iphone-style-checkboxes/images/slider_right.png0.31KB0.41KB0.00%
includes/classes/admin-page-class/js/FancyCheckbox/images/iphone.png6.26KB2.56KB▼ 59.13%