10% registration-and-authorization

Code Review | IQ Authorization

WordPress plugin IQ Authorization scored10%from 54 tests.

About plugin

  • Plugin page: registration-and-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-8.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Mar 4, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: lumpx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /99 total downloads

Benchmarks

Plugin footprint 23% 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
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function 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: ▼1.16MB] [CPU: ▼45.52ms] Passed 4 tests

An overview of server-side resources used by IQ Authorization
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6415.18 ▼26.33
Dashboard /wp-admin2.86 ▼0.4919.34 ▼46.86
Posts /wp-admin/edit.php2.86 ▼0.5018.53 ▼29.09
Add New Post /wp-admin/post-new.php2.86 ▼3.0316.29 ▼79.80
Media Library /wp-admin/upload.php2.86 ▼0.3718.24 ▼19.35
Custom fields /wp-admin/admin.php?page=iq-auth-custom-fields-page2.8618.44
Registration /wp-admin/admin.php?page=iq-auth-regist-page2.8616.87
IQ Authorization /wp-admin/admin.php?page=iq-auth-index2.8616.57
Authorization /wp-admin/admin.php?page=iq-auth-login-page2.8617.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 56 new files
Database: 3 new tables, 6 new options
New tables
wp_iq_auth_code
wp_iq_auth_settings
wp_iq_auth_antiflood
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for IQ Authorization
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9814.35 ▲0.211.97 ▲0.3542.51 ▼3.65
Dashboard /wp-admin2,240 ▲635.62 ▲0.0589.68 ▼4.3039.60 ▼0.37
Posts /wp-admin/edit.php2,148 ▲511.96 ▼0.0540.55 ▲4.8337.21 ▲4.37
Add New Post /wp-admin/post-new.php1,568 ▲4223.03 ▼0.58672.76 ▼31.7937.00 ▼20.60
Media Library /wp-admin/upload.php1,442 ▲424.21 ▲0.0394.77 ▼11.2840.44 ▼6.61
Custom fields /wp-admin/admin.php?page=iq-auth-custom-fields-page9191.9927.3075.87
Registration /wp-admin/admin.php?page=iq-auth-regist-page9512.0022.9150.11
IQ Authorization /wp-admin/admin.php?page=iq-auth-index1,1842.0025.6548.48
Authorization /wp-admin/admin.php?page=iq-auth-login-page8762.0425.6036.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_iq_auth_antiflood
    • wp_iq_auth_code
    • wp_iq_auth_settings
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=iq-auth-login-page
    • > User notice in wp-includes/functions.php+5905
    Function 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: authorization users, registration, user registration, authorization

registration-and-authorization/iq_authorize.php 77% from 13 tests

The main file in "IQ Authorization" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "5.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("registration-and-authorization.php" instead of "iq_authorize.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin32,528 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
HTML12,097016,845
CSS62,144148,865
PHP233883403,663
SVG2002,106
JavaScript5114131,049

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity19.00
▷ Minimum class complexity16.00
▷ Maximum class complexity21.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo_15022023205028.png7.83KB3.58KB▼ 54.34%
assets/img/iq_auth_nologo.png10.04KB10.03KB0.09%
assets/img/logo_15022023205955.png107.26KB38.31KB▼ 64.29%
assets/img/logo_15022023210008.png7.83KB3.58KB▼ 54.34%