90% site-private

Code Review | Site Private

WordPress plugin Site Private scored90%from 54 tests.

About plugin

  • Plugin page: site-private
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 14, 2014
  • Latest release: Jul 13, 2021
  • Number of updates: 7
  • Update frequency: every 347.6 days
  • Top authors: GZep (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,767 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.53ms] Passed 4 tests

This is a short check of server-side resources used by Site Private
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.84 ▼7.98
Dashboard /wp-admin3.31 ▲0.0046.49 ▼1.09
Posts /wp-admin/edit.php3.36 ▲0.0049.09 ▼3.64
Add New Post /wp-admin/post-new.php5.89 ▲0.00144.04 ▲60.40
Media Library /wp-admin/upload.php3.23 ▲0.0035.73 ▲2.60

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Site Private: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.541.58 ▼0.3741.23 ▲3.32
Dashboard /wp-admin2,203 ▲154.85 ▼1.04110.23 ▲3.8246.33 ▲5.74
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0139.76 ▼0.5534.77 ▼4.02
Add New Post /wp-admin/post-new.php1,514 ▼2817.68 ▼0.57682.52 ▲36.6851.27 ▼3.66
Media Library /wp-admin/upload.php1,391 ▲64.13 ▼0.08100.93 ▲0.8345.40 ▲3.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === site-private === )
The official readme.txt is a good inspiration

site-private/site-private.php Passed 13 tests

The principal PHP file in "Site Private" v. 1.2 is loaded by WordPress automatically on each request
64 characters long description:
Simplest plugin that redirects unauthorized users to login page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13612

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code1.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected