78% protect-your-content

Code Review | Protect Your Content

WordPress plugin Protect Your Content scored78%from 54 tests.

About plugin

  • Plugin page: protect-your-content
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Oct 13, 2015
  • Number of updates: 24
  • Update frequency: every 1.0 days
  • Top authors: seo-kueche (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,277 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.84ms] Passed 4 tests

Analyzing server-side resources used by Protect Your Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.41 ▲0.35
Dashboard /wp-admin3.34 ▼0.0148.28 ▼16.68
Posts /wp-admin/edit.php3.39 ▲0.0348.93 ▼4.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.20 ▼6.51
Media Library /wp-admin/upload.php3.26 ▲0.0335.97 ▲0.62

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
PYC-options-group
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Protect Your Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.28 ▼0.282.08 ▲0.4040.59 ▼4.20
Dashboard /wp-admin2,202 ▲285.61 ▲0.0883.16 ▼16.0238.01 ▼4.39
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0139.65 ▲3.2938.59 ▲3.14
Add New Post /wp-admin/post-new.php1,529 ▲123.80 ▲0.63700.18 ▲19.9553.30 ▲2.55
Media Library /wp-admin/upload.php1,404 ▲14.29 ▲0.0693.85 ▼9.8740.86 ▼3.69
Protect Your Content /wp-admin/Protect_Your_Content.php260.420.2115.17

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/protect-your-content/functions.php
    • > /wp-content/plugins/protect-your-content/Protect_Your_Content.php
    • > /wp-content/plugins/protect-your-content/option_page.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/Protect_Your_Content.php
    • > Network (severe)
    wp-admin/Protect_Your_Content.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

protect-your-content/Protect_Your_Content.php 92% from 13 tests

The entry point to "Protect Your Content" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("protect-your-content.php" instead of "Protect_Your_Content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin514 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36352514

PHP code Passed 2 tests

A short review of 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.60
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png78.27KB31.91KB▼ 59.23%