94% disable-right-click-ninetyseven-infotech

Code Review | Disable Right Click Ninetyseven Infotech

WordPress plugin Disable Right Click Ninetyseven Infotech scored 94% from 54 tests.

About plugin

  • Plugin page: disable-right-cli...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.8.1
  • First release: May 15, 2021
  • Latest release: May 15, 2021
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: sutharkaran10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 88 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Disable Right Click Ninetyseven Infotech
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.90 ▲14.44
Dashboard /wp-admin3.06 ▲0.0138.01 ▼8.93
Posts /wp-admin/edit.php3.12 ▲0.0139.61 ▼7.46
Add New Post /wp-admin/post-new.php5.42 ▼0.0186.31 ▼573.96
Media Library /wp-admin/upload.php3.01 ▲0.0132.66 ▼4.79

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Disable Right Click Ninetyseven Infotech
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲21916.29 ▲0.3312.46 ▲0.7549.97 ▼1.55
Dashboard /wp-admin2,995 ▲585.96 ▲0.05136.16 ▼12.85107.72 ▼4.16
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0262.53 ▲1.1189.59 ▲5.29
Add New Post /wp-admin/post-new.php1,672 ▼20018.95 ▼0.23378.86 ▼7.71104.80 ▼6.23
Media Library /wp-admin/upload.php1,810 ▲65.05 ▼0.00150.24 ▲10.77130.19 ▲11.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 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/disable-right-click-ninetyseven-infotech/disable-right-click-nsi.php:24

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: copy protect, right click disable, prevent right click, protection against copying, disable right click

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

The main file in "Disable Right Click Ninetyseven Infotech" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("disable-right-click-ninetyseven-infotech.php" instead of "disable-right-click-nsi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin39 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10020
PHP271719

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin