84% disable-right-click

Code Review | Prevent Content Theft [Disable Right Click]

WordPress plugin Prevent Content Theft [Disable Right Click] scored84%from 54 tests.

About plugin

  • Plugin page: disable-right-click
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Feb 26, 2020
  • Number of updates: 20
  • Update frequency: every 117.9 days
  • Top authors: shrinitech (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /50,774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by Prevent Content Theft [Disable Right Click]
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.66 ▼8.73
Dashboard /wp-admin3.32 ▲0.0145.33 ▼0.15
Posts /wp-admin/edit.php3.37 ▲0.0143.98 ▲0.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.03 ▼7.46
Media Library /wp-admin/upload.php3.24 ▲0.0129.57 ▼1.94

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Prevent Content Theft [Disable Right Click]
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲23714.02 ▼0.367.76 ▲5.9739.28 ▼4.11
Dashboard /wp-admin2,200 ▲95.80 ▼0.10100.57 ▼4.5640.30 ▲2.01
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0235.07 ▲0.9932.43 ▼4.58
Add New Post /wp-admin/post-new.php1,535 ▲223.18 ▼0.30618.60 ▼22.5155.41 ▼2.07
Media Library /wp-admin/upload.php1,388 ▼34.26 ▲0.0795.36 ▼1.1744.62 ▼1.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/disable-right-click/disable-right-click.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: disable right click, avoid content theft, avoid right click, no right click, protect blog content...

disable-right-click/disable-right-click.php 92% from 13 tests

The principal PHP file in "Prevent Content Theft [Disable Right Click]" v. 2.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected124 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1291666
CSS11041
JavaScript16017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected