84% simple-site-lockdown

Code Review | Simple Site Lockdown

WordPress plugin Simple Site Lockdown scored 84% from 54 tests.

About plugin

  • Plugin page: simple-site-lockdown
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-4.0
  • WordPress version: 6.3.1
  • First release: Feb 11, 2013
  • Latest release: Sep 3, 2014
  • Number of updates: 8
  • Update frequency: every 71.1 days
  • Top authors: philipjohn (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 9,020 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼0.05ms] Passed 4 tests

An overview of server-side resources used by Simple Site Lockdown
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.24 ▼0.43
Dashboard /wp-admin3.31 ▲0.0144.90 ▼3.56
Posts /wp-admin/edit.php3.36 ▲0.0152.01 ▲4.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.75 ▲5.27
Media Library /wp-admin/upload.php3.23 ▲0.0036.57 ▼0.45

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Site Lockdown
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.26 ▼1.175.69 ▲3.7043.01 ▼4.76
Dashboard /wp-admin2,206 ▲184.84 ▼1.06114.69 ▲1.1340.24 ▼2.85
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0440.23 ▼0.4636.14 ▼0.50
Add New Post /wp-admin/post-new.php1,533 ▼323.32 ▲0.22605.13 ▼25.9258.64 ▼2.32
Media Library /wp-admin/upload.php1,391 ▲34.14 ▼0.0597.05 ▼5.0842.94 ▼2.71

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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 following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-site-lockdown/simple-site-lockdown.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: maintenance, block, blocking, privacy

simple-site-lockdown/simple-site-lockdown.php Passed 13 tests

The main file in "Simple Site Lockdown" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
113 characters long description:
Provides a really simple mechanism for locking down a site so that it's private to all but logged in admin users.

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
Success! There were no dangerous files found in this plugin15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172315

PHP code Passed 2 tests

Analyzing 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.40
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 images were found in this plugin