68% disable-right-click-powered-by-pixterme

Code Review | Pixter Right Click Protect Images for Wordpress

WordPress plugin Pixter Right Click Protect Images for Wordpress scored68%from 54 tests.

About plugin

  • Plugin page: disable-right-cli...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Nov 21, 2016
  • Latest release: Nov 24, 2016
  • Number of updates: 21
  • Update frequency: every 1.5 days
  • Top authors: itayamar (95.24%)gilade (9.52%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,935 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼48.51ms] Passed 4 tests

A check of server-side resources used by Pixter Right Click Protect Images for Wordpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5841.90 ▲1.10
Dashboard /wp-admin3.01 ▼0.3410.97 ▼49.90
Posts /wp-admin/edit.php3.01 ▼0.3512.29 ▼33.89
Add New Post /wp-admin/post-new.php3.01 ▼2.8811.10 ▼86.32
Media Library /wp-admin/upload.php3.01 ▼0.2211.02 ▼23.92
Pixter Right Click Protect Images for Wordpress /wp-admin/admin.php?page=pixter_disable_right_click_plugin3.0111.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 14 new options
New WordPress options
pixter_disable_right_click_ver
theysaidso_admin_options
pixter_disable_right_click_options
widget_recent-posts
pixter_disable_right_click_is_guest_user
can_compress_scripts
pixter_disable_right_click_uid
widget_recent-comments
pixter_disable_right_click_db_ver
pixter_disable_right_click_user
...

Browser metrics Passed 4 tests

A check of browser resources used by Pixter Right Click Protect Images for Wordpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10914.84 ▲0.442.00 ▲0.1138.00 ▼4.72
Dashboard /wp-admin2,237 ▲494.90 ▼0.0095.57 ▼20.4883.61 ▲41.32
Posts /wp-admin/edit.php2,116 ▲242.02 ▼0.1035.70 ▼0.1432.83 ▼2.71
Add New Post /wp-admin/post-new.php1,555 ▲4118.17 ▲0.74706.49 ▲44.3262.10 ▲10.94
Media Library /wp-admin/upload.php1,410 ▲254.27 ▲0.06101.63 ▼0.5277.09 ▲33.99
Pixter Right Click Protect Images for Wordpress /wp-admin/admin.php?page=pixter_disable_right_click_plugin1,3682.7954.9038.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the pixter-me-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 11 options in the database
    • pixter_disable_right_click_db_ver
    • pixter_disable_right_click_ver
    • pixter_disable_right_click_options
    • can_compress_scripts
    • p1xtr_uid
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • pixter_disable_right_click_uid
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=pixter_disable_right_click_plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the pixter-me-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pixter_disable_right_click_plugin
    • > Notice in wp-content/plugins/disable-right-click-powered-by-pixterme/admin-page-class/admin-page-class.php+1658
    Undefined index: fields
    • > GET request to /wp-admin/admin.php?page=pixter_disable_right_click_plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.
    • > GET request to /wp-admin/admin.php?page=pixter_disable_right_click_plugin
    • > Notice in wp-content/plugins/disable-right-click-powered-by-pixterme/admin-page-class/admin-page-class.php+1645
    Undefined index: show_pages
    • > GET request to /wp-admin/admin.php?page=pixter_disable_right_click_plugin
    • > Notice in wp-content/plugins/disable-right-click-powered-by-pixterme/admin-page-class/admin-page-class.php+1645
    Undefined index: show_posts

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/disable-right-click-powered-by-pixterme/admin_functions.php:153

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 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

disable-right-click-powered-by-pixterme/pixter-disable-right-click.php 85% from 13 tests

The primary PHP file in "Pixter Right Click Protect Images for Wordpress" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disable-right-click-powered-by-pixterme.php" instead of "pixter-disable-right-click.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 detected12,833 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript139589787,670
PHP74751,4102,585
CSS93032411,919
PO File4276352659

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity199.00
▷ Minimum class complexity25.00
▷ Maximum class complexity373.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods130
▷ Static methods00.00%
▷ Public methods12696.92%
▷ Protected methods00.00%
▷ Private methods43.08%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
25 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin-page-class/images/remove.png2.15KB1.67KB▼ 22.25%
admin-icon.png0.76KB0.77KB0.00%
admin-page-class/js/FancyCheckbox/images/firerift.png5.95KB2.13KB▼ 64.11%
admin-page-class/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png0.12KB0.16KB0.00%
admin-page-class/css/images/ui-icons_f6cf3b_256x240.png8.68KB4.11KB▼ 52.68%