10% wp-disable-right-click

Code Review | WP Disable right click

WordPress plugin WP Disable right click scored10%from 54 tests.

About plugin

  • Plugin page: wp-disable-right-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5
  • WordPress version: 6.3.1
  • First release: Jul 6, 2016
  • Latest release: Jul 6, 2016
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: freelancevip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,075 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-disable-right-click/wp-disable-right-click.php+29
    Non-static method FLV_Disable_Right_Click::init() should not be called statically

Server metrics [RAM: ▼1.94MB] [CPU: ▼57.04ms] Passed 4 tests

This is a short check of server-side resources used by WP Disable right click
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.00 ▼37.54
Dashboard /wp-admin2.08 ▼1.236.32 ▼46.28
Posts /wp-admin/edit.php2.08 ▼1.287.05 ▼48.70
Add New Post /wp-admin/post-new.php2.08 ▼3.815.66 ▼95.63
Media Library /wp-admin/upload.php2.08 ▼1.166.42 ▼31.40

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Disable right click
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲11213.50 ▼0.889.01 ▲7.2843.40 ▲0.36
Dashboard /wp-admin2,195 ▲215.62 ▼0.0495.10 ▼0.3343.35 ▲0.21
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0338.10 ▼4.4537.17 ▲2.86
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▼0.14656.59 ▼32.4247.66 ▼5.92
Media Library /wp-admin/upload.php1,397 ▼04.17 ▼0.02112.03 ▲6.3947.81 ▲3.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-disable-right-click/wp-disable-right-click.php+29
    Non-static method FLV_Disable_Right_Click::init() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-disable-right-click/wp-disable-right-click.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: disable right click, copy protect, protection against copying, prevent right click, right click disable

wp-disable-right-click/wp-disable-right-click.php Passed 13 tests

The primary PHP file in "WP Disable right click" version 1.0 is used by WordPress to initiate all plugin functionality
31 characters long description:
Site Protection against copying

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected40 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10020
PHP1122120

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin