83% safe-private

Code Review | Safe Private

WordPress plugin Safe Private scored83%from 54 tests.

About plugin

  • Plugin page: safe-private
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 15, 2013
  • Latest release: Dec 15, 2013
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: Sherpah_ (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /5,191 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.00MB] [CPU: ▼8.69ms] Passed 4 tests

Server-side resources used by Safe Private
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.19 ▲2.28
Dashboard /wp-admin3.32 ▼0.0350.64 ▼15.12
Posts /wp-admin/edit.php3.37 ▲0.0148.16 ▼6.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0198.44 ▼12.24
Media Library /wp-admin/upload.php3.24 ▲0.0137.16 ▼0.96

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Safe Private: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.391.95 ▲0.3046.62 ▲6.28
Dashboard /wp-admin2,195 ▲215.60 ▼0.0388.51 ▲1.5740.00 ▼2.29
Posts /wp-admin/edit.php2,097 ▼61.97 ▼0.0334.10 ▼10.7133.49 ▼4.34
Add New Post /wp-admin/post-new.php1,531 ▲223.03 ▲0.01600.45 ▼81.1549.85 ▼11.85
Media Library /wp-admin/upload.php1,400 ▼34.18 ▲0.0498.15 ▲2.5742.97 ▼1.49

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

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/safe-private/safe-private.php:18

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
  • Donate link: Invalid URI found ("")
  • Plugin Name: Please specify the plugin name on the first line ( === safe-private === )
The official readme.txt might help

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

"Safe Private" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
31 characters long description:
A Safe Wordpess Private Website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112436

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.43KB9.23KB▼ 49.95%