99% rcd-right-click-disabler

Code Review | RCD-Right Click Disabler

WordPress plugin RCD-Right Click Disabler scored 99% from 54 tests.

About plugin

  • Plugin page: rcd-right-click-d...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Nov 19, 2017
  • Latest release: Jun 11, 2021
  • Number of updates: 15
  • Update frequency: every 86.7 days
  • Top authors: paramsheoran (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 12,129 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼138.63ms] Passed 4 tests

This is a short check of server-side resources used by RCD-Right Click Disabler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0036.40 ▲2.17
Dashboard /wp-admin3.06 ▲0.0147.53 ▲4.62
Posts /wp-admin/edit.php3.11 ▲0.0044.45 ▲0.37
Add New Post /wp-admin/post-new.php5.42 ▼0.0292.91 ▼549.65
Media Library /wp-admin/upload.php3.00 ▲0.0031.98 ▼7.39

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

RCD-Right Click Disabler: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.81 ▲0.1810.32 ▼1.3747.29 ▲0.76
Dashboard /wp-admin2,969 ▲385.92 ▼0.03152.44 ▼2.67112.50 ▲0.90
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0069.42 ▲6.1089.20 ▲7.86
Add New Post /wp-admin/post-new.php1,683 ▲1118.72 ▼0.37386.13 ▼37.59108.09 ▲0.24
Media Library /wp-admin/upload.php1,807 ▲595.02 ▲0.01152.98 ▼31.42115.82 ▲4.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: disable copypaste control, protect content, disable images selection, disable right click, right click disabler...

rcd-right-click-disabler/rcd-main.php 77% from 13 tests

The principal PHP file in "RCD-Right Click Disabler" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rcd-right-click-disabler.php" instead of "rcd-main.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected51 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13727
PHP171818
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.71
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin