89% yumjam-require-login

Code Review | YumJam Require Login

WordPress plugin YumJam Require Login scored89%from 54 tests.

About plugin

  • Plugin page: yumjam-require-login
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Jun 3, 2020
  • Number of updates: 14
  • Update frequency: every 58.0 days
  • Top authors: matt.burnett (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.36ms] Passed 4 tests

This is a short check of server-side resources used by YumJam Require Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.91 ▼5.38
Dashboard /wp-admin3.38 ▲0.0849.45 ▼0.06
Posts /wp-admin/edit.php3.49 ▲0.1351.75 ▲3.75
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.31 ▼7.94
Media Library /wp-admin/upload.php3.27 ▲0.0532.40 ▼0.07
YumJam Require Login /wp-admin/options-general.php?page=rl_options3.3138.43

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
rl_enable
rl_cust_log_form
can_compress_scripts
db_upgraded
rl_red_aft_log
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
rl_red_aft_log_url

Browser metrics Passed 4 tests

Checking browser requirements for YumJam Require Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,074 ▲33915.45 ▲1.215.15 ▲3.4339.05 ▼5.60
Dashboard /wp-admin2,375 ▲1876.70 ▲1.78129.09 ▲28.4241.39 ▼3.32
Posts /wp-admin/edit.php2,275 ▲1863.59 ▲1.5755.01 ▲18.5432.57 ▼2.72
Add New Post /wp-admin/post-new.php1,550 ▲723.25 ▲5.07655.40 ▲35.8534.76 ▼16.86
Media Library /wp-admin/upload.php1,417 ▲264.36 ▲0.1486.33 ▼12.6344.31 ▲0.97
YumJam Require Login /wp-admin/options-general.php?page=rl_options1,1993.7047.6028.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: user login, intranet, authentication, forced login, restrict access...

yumjam-require-login/require_login.php 85% from 13 tests

Analyzing the main PHP file in "YumJam Require Login" version 1.1.5
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yumjam-require-login.php" instead of "require_login.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin2,058 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4118361,318
CSS47541400
PHP25681340

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2793.10%
▷ Protected methods00.00%
▷ Private methods26.90%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/chosen/chosen-sprite.png0.53KB0.88KB0.00%
1px.png0.15KB0.12KB▼ 20.51%
lib/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%