99% visitor-login-notice

Code Review | Visitor Login Notice

WordPress plugin Visitor Login Notice scored 99% from 54 tests.

About plugin

  • Plugin page: visitor-login-notice
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.6
  • WordPress version: 5.8.1
  • First release: Feb 19, 2021
  • Latest release: Feb 19, 2021
  • Number of updates: 6
  • Update frequency: every 2.7 days
  • Top authors: mariaak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 172 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼149.60ms] Passed 4 tests

Server-side resources used by Visitor Login Notice
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0828.70 ▼4.79
Dashboard /wp-admin3.15 ▲0.0839.33 ▼2.22
Posts /wp-admin/edit.php3.26 ▲0.1537.16 ▼6.37
Add New Post /wp-admin/post-new.php5.51 ▲0.0775.43 ▼585.00
Media Library /wp-admin/upload.php3.10 ▲0.0927.25 ▲0.89
Visitor Login Notice /wp-admin/options-general.php?page=vln_plugin_opts3.0721.94

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Visitor Login Notice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲19615.94 ▲0.2610.59 ▲2.2675.78 ▼2.53
Dashboard /wp-admin2,938 ▲396.13 ▼0.00114.21 ▼15.97167.64 ▼4.71
Posts /wp-admin/edit.php2,745 ▲53.24 ▲0.0164.20 ▲2.32141.39 ▲10.79
Add New Post /wp-admin/post-new.php3,810 ▲7518.33 ▼0.38459.72 ▼3.18164.35 ▼9.30
Media Library /wp-admin/upload.php1,754 ▲25.53 ▲0.02162.26 ▲21.40195.25 ▲10.93
Visitor Login Notice /wp-admin/options-general.php?page=vln_plugin_opts2,0013.8384.19106.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: login reminder, login notice, login

visitor-login-notice/visitor-login-notice.php 85% from 13 tests

Analyzing the main PHP file in "Visitor Login Notice" version 1.0.0
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin636 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8139204485
CSS213381
Markdown115036
JavaScript3132734

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.33
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2996.67%
▷ Protected methods00.00%
▷ Private methods13.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin