77% wp-site-protector

Code Review | WP Site Protector

WordPress plugin WP Site Protector scored 77% from 54 tests.

About plugin

  • Plugin page: wp-site-protector
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Oct 28, 2010
  • Latest release: Mar 4, 2018
  • Number of updates: 61
  • Update frequency: every 44.0 days
  • Top authors: Moriyan Jay (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 13,169 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼293.91ms] Passed 4 tests

An overview of server-side resources used by WP Site Protector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0253.20 ▲4.33
Dashboard /wp-admin3.42 ▲0.0132.73 ▲0.85
Posts /wp-admin/edit.php3.65 ▲0.0139.97 ▲4.19
Add New Post /wp-admin/post-new.php6.89 ▼0.0893.45 ▼1,184.13
Media Library /wp-admin/upload.php3.30 ▲0.0128.59 ▲3.47

Server storage [IO: ▲0.10MB] [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: 7 new files
Database: no new tables, 1 new option
New WordPress options
wp_site_protector_r_db_version

Browser metrics Passed 4 tests

WP Site Protector: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,775 ▲2115.82 ▲0.247.22 ▲1.432.44 ▼0.30
Dashboard /wp-admin2,897 ▲366.12 ▼0.15115.63 ▼19.02153.05 ▼11.70
Posts /wp-admin/edit.php2,693 ▼13.23 ▼0.0260.76 ▼1.86137.13 ▼5.11
Add New Post /wp-admin/post-new.php1,671 ▼4618.63 ▼2.35410.68 ▼43.09153.19 ▼10.61
Media Library /wp-admin/upload.php1,700 ▲25.52 ▼0.02139.51 ▲3.03185.75 ▼9.30
WP Site Protector /wp-admin/wp-site-protector.php260.940.0319.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • wp_site_protector_r_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-site-protector/wp-site-protector.php:36

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/wp-site-protector.php
    • > Network (severe)
    wp-admin/wp-site-protector.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Settings Page), #2 (Settings Page)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Invalid version format
The official readme.txt might help

wp-site-protector/wp-site-protector.php 92% from 13 tests

"WP Site Protector" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 945 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin306 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24010305
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions15
▷ Named functions15100.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
3 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png37.58KB20.62KB▼ 45.12%
screenshot-1.png32.49KB17.56KB▼ 45.95%
media/wp-site-protector-pro.png17.20KB15.10KB▼ 12.20%