10% wordpress-protection

Code Review | WordPress Protection [Protect Your Website Content]

WordPress plugin WordPress Protection [Protect Your Website Content] scored10%from 54 tests.

About plugin

  • Plugin page: wordpress-protection
  • Plugin version: 8...
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 29, 2012
  • Latest release: May 29, 2017
  • Number of updates: 140
  • Update frequency: every 13.9 days
  • Top authors: Chris Hudson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active /45,830 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wordpress-protection/wordpress-protection.php+31
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.88MB] [CPU: ▼60.53ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Protection [Protect Your Website Content]
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.365.39 ▼40.73
Dashboard /wp-admin2.13 ▼1.185.77 ▼46.96
Posts /wp-admin/edit.php2.13 ▼1.237.28 ▼47.86
Add New Post /wp-admin/post-new.php2.13 ▼3.765.33 ▼106.57
Media Library /wp-admin/upload.php2.13 ▼1.106.64 ▼32.19

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Protection [Protect Your Website Content]
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.48 ▼0.717.89 ▲5.8244.39 ▼0.89
Dashboard /wp-admin2,199 ▲195.59 ▼0.1189.44 ▲0.8938.99 ▲0.55
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0140.03 ▲0.6836.17 ▼0.90
Add New Post /wp-admin/post-new.php1,540 ▲1218.54 ▼4.64634.86 ▼38.2966.20 ▲11.41
Media Library /wp-admin/upload.php1,404 ▲74.21 ▼0.0695.86 ▼11.8943.80 ▲0.65
WordPress Protection /wp-admin/wordpress-protection.php260.420.1516.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wordpress-protection/wordpress-protection.php+31
    Trying to access array offset on value of type null
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • wordpress_protection_db_version
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wordpress-protection/index.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wordpress-protection/wordpress-protection.php on line 31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wordpress-protection/wordpress-protection.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wordpress-protection/settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wordpress-protection/settings.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/wordpress-protection.php
    • > Network (severe)
    wp-admin/wordpress-protection.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (Options Page) image not found
You can look at the official readme.txt

wordpress-protection/wordpress-protection.php 85% from 13 tests

This is the main PHP file of "WordPress Protection [Protect Your Website Content]" version 8..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 575 characters long)
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "8...")

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
Everything looks great! No dangerous files found in this plugin357 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34121357

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Constants19
▷ Global constants19100.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
2 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wordpress-protection-pro.png93.32KB30.08KB▼ 67.76%
screenshot-1.png28.37KB16.64KB▼ 41.35%