83% content-copy-protection-disable-right-click

Code Review | Content Copy Protection & Disable Right Click

WordPress plugin Content Copy Protection & Disable Right Click scored83%from 54 tests.

About plugin

  • Plugin page: content-copy-prot...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Jun 9, 2021
  • Latest release: Feb 28, 2022
  • Number of updates: 7
  • Update frequency: every 37.9 days
  • Top authors: subodhghulaxe (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /8,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.22ms] Passed 4 tests

Server-side resources used by Content Copy Protection & Disable Right Click
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.99 ▼3.31
Dashboard /wp-admin3.35 ▲0.0147.88 ▼17.10
Posts /wp-admin/edit.php3.47 ▲0.1152.73 ▼1.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0597.63 ▼2.92
Media Library /wp-admin/upload.php3.28 ▲0.0536.49 ▲0.12
Disable Right Click /wp-admin/options-general.php?page=ccpdrc_options3.2734.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
ccpdrc_settings
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Content Copy Protection & Disable Right Click: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.22 ▼1.151.83 ▲0.0840.25 ▼2.69
Dashboard /wp-admin2,210 ▲224.85 ▼0.02111.22 ▼5.5444.25 ▲1.46
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0039.98 ▲0.6035.00 ▼4.18
Add New Post /wp-admin/post-new.php1,541 ▲2222.91 ▼0.11594.00 ▼92.9459.83 ▲1.73
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0096.22 ▼21.8045.48 ▼2.26
Disable Right Click /wp-admin/options-general.php?page=ccpdrc_options1,0952.0324.4845.84

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/content-copy-protection-disable-right-click/admin/pages/tabs/basic.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-copy-protection-disable-right-click/admin/pages/tabs/help.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/content-copy-protection-disable-right-click/admin/pages/tabs/advanced.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/content-copy-protection-disable-right-click/admin/pages/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Settings screen), #2 (Help screen)
Please take inspiration from this readme.txt

content-copy-protection-disable-right-click/CCPDRC.php 85% from 13 tests

The primary PHP file in "Content Copy Protection & Disable Right Click" version 1.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("content-copy-protection-disable-right-click.php" instead of "CCPDRC.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin713 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP867128364
CSS212191
JavaScript21825158

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.00
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 files were detected