90% disable-right-click-images

Code Review | Disable Right Click Images

WordPress plugin Disable Right Click Images scored90%from 54 tests.

About plugin

  • Plugin page: disable-right-cli...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 9
  • Update frequency: every 148.8 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /3,269 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Disable Right Click Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.24 ▼8.22
Dashboard /wp-admin3.31 ▲0.0143.47 ▼9.23
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▲1.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.80 ▼2.46
Media Library /wp-admin/upload.php3.23 ▲0.0033.61 ▲1.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Disable Right Click Images: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16014.00 ▼0.405.82 ▲3.9337.56 ▼8.11
Dashboard /wp-admin2,206 ▲185.90 ▲0.80106.39 ▼5.1238.77 ▼7.33
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1544.03 ▲7.7136.22 ▼0.09
Add New Post /wp-admin/post-new.php1,533 ▲523.31 ▲4.68602.32 ▲7.7252.26 ▼9.96
Media Library /wp-admin/upload.php1,382 ▼94.20 ▼0.0197.23 ▼3.0942.73 ▲0.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: photo, images, image, photos

disable-right-click-images/main.php 92% from 13 tests

The entry point to "Disable Right Click Images" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("disable-right-click-images.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin43 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11838
JavaScript1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin