78% secure-ip-logins

Code Review | Secure IP Logins

WordPress plugin Secure IP Logins scored 78% from 54 tests.

About plugin

  • Plugin page: secure-ip-logins
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-5.2
  • WordPress version: 5.9.2
  • First release: May 12, 2019
  • Latest release: May 21, 2019
  • Number of updates: 21
  • Update frequency: every 4.4 days
  • Top authors: ivacy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼300.32ms] Passed 4 tests

An overview of server-side resources used by Secure IP Logins
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.4777.76 ▲22.89
Dashboard /wp-admin3.87 ▲0.4638.48 ▲4.83
Posts /wp-admin/edit.php4.10 ▲0.4673.46 ▲35.39
Add New Post /wp-admin/post-new.php7.33 ▲0.3694.98 ▼1,196.51
Media Library /wp-admin/upload.php3.81 ▲0.5227.66 ▼32.49
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius4.0225.96

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 225 new files
Database: no new tables, 5 new options
New WordPress options
fs_debug_mode
fs_gdpr
fs_active_plugins
fs_accounts
fs_api_cache

Browser metrics Passed 4 tests

A check of browser resources used by Secure IP Logins
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,821 ▲6716.01 ▲0.005.82 ▼0.012.02 ▼0.74
Dashboard /wp-admin2,951 ▲976.21 ▲0.01117.22 ▼18.81199.52 ▼38.10
Posts /wp-admin/edit.php2,747 ▲593.26 ▲0.0362.38 ▼3.83167.94 ▲26.32
Add New Post /wp-admin/post-new.php1,691 ▼8215.55 ▼6.44430.72 ▼19.00154.82 ▼42.44
Media Library /wp-admin/upload.php1,810 ▲1155.67 ▲0.15125.83 ▼23.37271.03 ▲82.19
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,4702.7554.43127.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 5 options
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode
    • fs_api_cache

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/secure-ip-logins/inc/freemius/templates/ajax-loader.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/secure-ip-logins/inc/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/secure-ip-logins/inc/freemius/templates/account/partials/addon.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: secure login, security, secure wordpress login, dedicated ip

secure-ip-logins/secure-ip-logins.php Passed 13 tests

The principal PHP file in "Secure IP Logins" v. 0.1 is loaded by WordPress automatically on each request
124 characters long description:
This Plugin allows you to access your WordPress sites only with the Whitelisted IP Addresses that you have allowed yourself.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin42,602 lines of code in 179 files:
LanguageFilesBlank linesComment linesLines of code
PHP1106,30614,58326,535
PO File105,5506,66712,010
Sass31424783,020
CSS16673417
JavaScript65899341
Markdown2680214
JSON20037
YAML22028

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity71.17
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,056
▷ Static methods16615.72%
▷ Public methods74270.27%
▷ Protected methods151.42%
▷ Private methods29928.31%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants122
▷ Global constants10283.61%
▷ Class constants2016.39%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
inc/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%