83% disabled-source-disabled-right-click-and-content-protection

Code Review | Disabled Source, Disabled Right Click and Content Protection

WordPress plugin Disabled Source, Disabled Right Click and Content Protection scored83%from 54 tests.

About plugin

  • Plugin page: disabled-source-d...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Nov 12, 2023
  • Number of updates: 30
  • Update frequency: every 24.9 days
  • Top authors: jahidcse (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

4,000+ active /29,485 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
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.53ms] Passed 4 tests

A check of server-side resources used by Disabled Source, Disabled Right Click and Content Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2237.21 ▼3.47
Dashboard /wp-admin3.51 ▲0.1650.19 ▼4.56
Posts /wp-admin/edit.php3.62 ▲0.2653.04 ▲6.08
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.43 ▼9.14
Media Library /wp-admin/upload.php3.43 ▲0.2036.80 ▲3.07
Codestar Framework /wp-admin/tools.php?page=csf-welcome3.4839.85

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 135 new files
Database: no new tables, 8 new options
New WordPress options
jh_disabled_option
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
jh_installation_date
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Disabled Source, Disabled Right Click and Content Protection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲6214.22 ▼0.111.70 ▼0.3241.42 ▼2.26
Dashboard /wp-admin2,246 ▲665.56 ▼0.1290.73 ▼0.2040.96 ▼4.99
Posts /wp-admin/edit.php2,155 ▲552.08 ▲0.0640.60 ▲3.4736.74 ▲1.20
Add New Post /wp-admin/post-new.php1,568 ▲3723.33 ▲0.51689.20 ▲32.4550.19 ▼5.94
Media Library /wp-admin/upload.php1,451 ▲544.24 ▲0.0797.81 ▼8.4341.56 ▼1.57
Codestar Framework /wp-admin/tools.php?page=csf-welcome1,4713.4756.6961.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • jh_installation_date
    • widget_recent-comments
    • jh_disabled_option
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant JH_PATH - assumed 'JH_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/disabled-source-disabled-right-click-and-content-protection/includes/functions/functions.php on line 7
    • > PHP Warning
      Use of undefined constant JH_PATH - assumed 'JH_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/disabled-source-disabled-right-click-and-content-protection/includes/functions/functions.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disabled-source-disabled-right-click-and-content-protection/includes/functions/functions.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disabled-source-disabled-right-click-and-content-protection/includes/functions/notice.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
The official readme.txt might help

disabled-source-disabled-right-click-and-content-protection/disabled-source-and-content-protection.php 85% from 13 tests

The main PHP file in "Disabled Source, Disabled Right Click and Content Protection" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disabled-source-disabled-right-click-and-content-protection.php" instead of "disabled-source-and-content-protection.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected19,174 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP772,6751,67911,779
PO File203,1983,5916,500
Markdown31670634
JavaScript442154
CSS47260
JSON10045
SVG2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity22.50
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods273
▷ Static methods3211.72%
▷ Public methods23987.55%
▷ Protected methods62.20%
▷ Private methods2810.26%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/admin/framework/assets/images/checkerboard.png2.29KB2.54KB0.00%