89% simple-require-login

Code Review | Simple Require Login

WordPress plugin Simple Require Login scored 89% from 54 tests.

About plugin

  • Plugin page: simple-require-login
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2015
  • Latest release: Jul 6, 2016
  • Number of updates: 7
  • Update frequency: every 32.9 days
  • Top authors: timmcdaniels (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.65MB] [CPU: ▼15.60ms] Passed 4 tests

Server-side resources used by Simple Require Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.75 ▲1.53
Dashboard /wp-admin3.34 ▲0.0448.07 ▼2.39
Posts /wp-admin/edit.php3.39 ▲0.0347.08 ▲1.45
Add New Post /wp-admin/post-new.php3.19 ▼2.7037.42 ▼62.64
Media Library /wp-admin/upload.php3.26 ▲0.0335.95 ▲1.18

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Require Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.30 ▼1.054.18 ▲2.4944.11 ▼7.86
Dashboard /wp-admin2,208 ▲204.85 ▼1.03114.81 ▲3.7042.85 ▼3.36
Posts /wp-admin/edit.php2,091 ▲22.06 ▲0.0636.15 ▼0.4031.18 ▼6.59
Add New Post /wp-admin/post-new.php6,524 ▲5,00520.30 ▼2.67900.02 ▲234.4172.98 ▲22.63
Media Library /wp-admin/upload.php1,384 ▼44.27 ▲0.1098.11 ▼18.0242.42 ▼6.13

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (This is a screenshot of the Simple Require Login metabox when editing a page.) image required
The official readme.txt is a good inspiration

simple-require-login/simple-require-login.php 92% from 13 tests

The main PHP script in "Simple Require Login" version 0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.5" instead of "3.4.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected140 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP250126130
JavaScript10010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png43.93KB12.93KB▼ 70.56%