78% right-click-disable-or-ban

Code Review | Right Click Disable OR Ban

WordPress plugin Right Click Disable OR Ban scored78%from 54 tests.

About plugin

  • Plugin page: right-click-disab...
  • Plugin version: 1.1.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: May 18, 2023
  • Number of updates: 62
  • Update frequency: every 43.3 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /17,066 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.83ms] Passed 4 tests

Server-side resources used by Right Click Disable OR Ban
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.91 ▼4.09
Dashboard /wp-admin3.33 ▲0.0349.52 ▼1.25
Posts /wp-admin/edit.php3.38 ▲0.0351.64 ▲1.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.90 ▲0.65
Media Library /wp-admin/upload.php3.25 ▲0.0337.98 ▼2.62
Our Theme /wp-admin/edit.php?post_type=right-click-disable-or-ban&page=sr-theme-page3.0328.63
Docs /wp-admin/admin.php?page=rcb-doc-page3.2233.74
Right Click Disable /wp-admin/admin.php?page=right-click-disable-or-ban3.2431.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Right Click Disable OR Ban
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.47 ▲0.071.65 ▼0.5442.46 ▼1.80
Dashboard /wp-admin2,229 ▲385.84 ▼0.05114.05 ▲9.4443.01 ▲1.44
Posts /wp-admin/edit.php2,112 ▲202.05 ▲0.0341.19 ▼0.0735.94 ▲1.27
Add New Post /wp-admin/post-new.php1,566 ▲4718.42 ▼4.73636.78 ▲19.0965.93 ▲13.82
Media Library /wp-admin/upload.php1,414 ▲264.21 ▼0.06106.73 ▼2.3242.49 ▼1.89
Our Theme /wp-admin/edit.php?post_type=right-click-disable-or-ban&page=sr-theme-page280.440.083.99
Docs /wp-admin/admin.php?page=rcb-doc-page8582.0225.1627.40
Right Click Disable /wp-admin/admin.php?page=right-click-disable-or-ban8552.1626.7537.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/right-click-disable-or-ban/docs.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/right-click-disable-or-ban/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/right-click-disable-or-ban/right-click-disable-or-ban.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/right-click-disable-or-ban/our-theme/awp-theme.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=right-click-disable-or-ban&page=sr-theme-page
    • > Network (severe)
    wp-admin/edit.php?post_type=right-click-disable-or-ban&page=sr-theme-page - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% 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:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
Please take inspiration from this readme.txt

right-click-disable-or-ban/right-click-disable-or-ban.php Passed 13 tests

The entry point to "Right Click Disable OR Ban" version 1.1.17 is a PHP file that has certain tags in its header comment area
40 characters long description:
Disable Right Click On WordPress Website

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
Success! There were no dangerous files found in this plugin1,588 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG200973
PHP44246312
CSS42613220
PO File1323283

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%