83% right-click-disable-for-secure

Code Review | Right Click Disable for Secure

WordPress plugin Right Click Disable for Secure scored83%from 54 tests.

About plugin

  • Plugin page: right-click-disab...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 13, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 22
  • Update frequency: every 19.2 days
  • Top authors: hrhabibpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.79ms] Passed 4 tests

Server-side resources used by Right Click Disable for Secure
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.25 ▼5.45
Dashboard /wp-admin3.35 ▲0.0551.53 ▲0.03
Posts /wp-admin/edit.php3.40 ▲0.0548.19 ▼3.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.91 ▲1.78
Media Library /wp-admin/upload.php3.27 ▲0.0543.19 ▲11.20

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Right Click Disable for Secure
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.30 ▼0.051.81 ▲0.0044.32 ▼1.41
Dashboard /wp-admin2,208 ▲345.72 ▲0.0998.11 ▼8.5579.01 ▲34.01
Posts /wp-admin/edit.php2,116 ▲161.99 ▼0.0335.00 ▼2.8835.95 ▼0.32
Add New Post /wp-admin/post-new.php1,560 ▲3418.42 ▼5.08717.15 ▼25.7155.13 ▼7.13
Media Library /wp-admin/upload.php1,410 ▲104.11 ▼0.05103.93 ▼3.1779.62 ▲34.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/right-click-disable-for-secure/admin/rcdfors-option.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot-1.png), #2 (Screenshot-2.png), #3 (Screenshot-3.png), #4 (Screenshot-4.png), #5 (Screenshot-5.png), #6 (Screenshot-6.png), #7 (Screenshot-7.png)
You can look at the official readme.txt

right-click-disable-for-secure/rcd-for-secure.php 77% from 13 tests

"Right Click Disable for Secure" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 242 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("right-click-disable-for-secure.php" instead of "rcd-for-secure.php")

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
No dangerous file extensions were detected569 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1107337
PHP42652232

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions7
▷ Named functions7100.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/facebook.png0.87KB0.84KB▼ 3.60%
img/linkedin.png0.88KB0.86KB▼ 2.88%
img/instagram.png3.41KB1.95KB▼ 42.91%
img/rcdfors-admin.png0.46KB0.70KB0.00%
img/website.png1.93KB1.80KB▼ 7.07%