10% electric-studio-client-login

Code Review | Electric Studio Client Login

WordPress plugin Electric Studio Client Login scored 10% from 54 tests.

About plugin

  • Plugin page: electric-studio-c...
  • Plugin version: 0.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.3.1
  • WordPress version: 5.9.2
  • First release: Sep 13, 2011
  • Latest release: Jun 13, 2012
  • Number of updates: 38
  • Update frequency: every 7.2 days
  • Top authors: irvingswiftj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,080 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5768
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼0.16MB] [CPU: ▼311.42ms] Passed 4 tests

Server-side resources used by Electric Studio Client Login
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0560.28 ▲8.48
Dashboard /wp-admin3.48 ▲0.0833.84 ▼40.98
Posts /wp-admin/edit.php3.71 ▲0.0740.27 ▲0.12
Add New Post /wp-admin/post-new.php6.14 ▼0.8383.22 ▼1,201.77
Media Library /wp-admin/upload.php3.37 ▲0.0723.24 ▼3.05
Client Setup /wp-admin/admin.php?page=escl_client_setup3.3325.07
General Settings /wp-admin/admin.php?page=escl_options3.3127.20
Group Management /wp-admin/admin.php?page=escl_group_options3.3125.62

Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • There were 1 file (0.46KB) illegally modified outside of "wp-content/plugins/electric-studio-client-login/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentytwo/page-clientarea.php
Filesystem: 20 new files
Database: 2 new tables, 3 new options
New tables
wp_escl_user_group
wp_escl_user_group_rel
New WordPress options
escl_fields
escl_general_settings
escl_version

Browser metrics Passed 4 tests

An overview of browser requirements for Electric Studio Client Login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,832 ▲7815.69 ▲0.076.50 ▲0.682.96 ▲0.84
Dashboard /wp-admin2,925 ▲646.17 ▼0.01126.26 ▼11.43173.71 ▲7.04
Posts /wp-admin/edit.php2,736 ▲663.26 ▲0.0166.75 ▼34.60141.69 ▼4.63
Add New Post /wp-admin/post-new.php1,736 ▲2517.84 ▼3.48412.98 ▼52.77183.51 ▲24.89
Media Library /wp-admin/upload.php1,740 ▲425.55 ▲0.02154.06 ▲4.29202.66 ▲4.75
Client Setup /wp-admin/admin.php?page=escl_client_setup1,1092.6556.49122.78
General Settings /wp-admin/admin.php?page=escl_options1,0482.6557.89114.15
Group Management /wp-admin/admin.php?page=escl_group_options1,0972.6357.9297.18

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 2 options
    • escl_version
    • escl_general_settings

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=escl_group_options
    • > Notice in wp-content/plugins/electric-studio-client-login/lib/ajax.php+84
    Undefined index: escl_slug
    • > GET request to /wp-admin/admin.php?page=escl_options
    • > Notice in wp-content/plugins/electric-studio-client-login/lib/options.php+401
    Undefined index: escl_logout_redirect
    • > GET request to /wp-admin/admin.php?page=escl_group_options
    • > Deprecated in wp-content/plugins/electric-studio-client-login/lib/options.php+428
    Non-static method Escl_groups::list_groups() should not be called statically
    • > GET request to /wp-admin/admin.php?page=escl_group_options
    • > User notice in wp-includes/functions.php+5768
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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
The following issues need your attention
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_User' not found in wp-content/plugins/electric-studio-client-login/lib/user.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_root() in wp-content/plugins/electric-studio-client-login/lib/escl_config.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/electric-studio-client-login/lib/ajax.php:6
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/electric-studio-client-login/electric_studio_client_login.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/electric-studio-client-login/lib/functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/electric-studio-client-login/templates/page-clientarea.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/electric-studio-client-login/electric_studio_client_login.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/electric-studio-client-login/lib/options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/electric-studio-client-login/lib/metabox.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=escl_group_options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/electric-studio-client-login/js/escl_livesearch.js?ver=5.9.2:10:24)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=escl_group_options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === electric-studio-client-login === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Configuration Page), #2 (Restrict pages using our metabox on the posts/pages edit view.)
You can look at the official readme.txt

electric-studio-client-login/electric_studio_client_login.php 92% from 13 tests

The entry point to "Electric Studio Client Login" version 0.8.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("electric-studio-client-login.php" instead of "electric_studio_client_login.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,077 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP102613391,037
JavaScript12021
XML20018
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity12.71
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods59100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png29.37KB12.29KB▼ 58.17%
screenshot-1.png36.17KB14.91KB▼ 58.78%