78% javascript-obfuscator

Code Review | Javascript Obfuscator

WordPress plugin Javascript Obfuscator scored78%from 54 tests.

About plugin

  • Plugin page: javascript-obfusc...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 21, 2020
  • Latest release: Aug 27, 2023
  • Number of updates: 9
  • Update frequency: every 139.6 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,005 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.39ms] Passed 4 tests

Analyzing server-side resources used by Javascript Obfuscator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.64 ▼1.80
Dashboard /wp-admin3.44 ▲0.0944.86 ▼16.12
Posts /wp-admin/edit.php3.55 ▲0.1967.07 ▲22.22
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.97 ▼12.06
Media Library /wp-admin/upload.php3.36 ▲0.1336.16 ▲0.42
JS Obfuscate /wp-admin/options-general.php?page=javascript-obfuscate3.3332.55

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
jsobfuscate_basic_settings
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Javascript Obfuscator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.131.71 ▼0.0244.02 ▲3.51
Dashboard /wp-admin2,213 ▲254.84 ▼1.05102.66 ▲3.9244.40 ▲3.13
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0338.50 ▼2.5231.95 ▼1.76
Add New Post /wp-admin/post-new.php1,545 ▲1218.18 ▼5.00655.80 ▲36.3860.83 ▲8.44
Media Library /wp-admin/upload.php1,395 ▲44.10 ▼0.06101.39 ▲4.6942.08 ▲0.57
JS Obfuscate /wp-admin/options-general.php?page=javascript-obfuscate8791.9230.8422.39

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • jsobfuscate_basic_settings
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/javascript-obfuscator/includes/library/vendor/tholu/php-packer/tests/test.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WPJSOBFUSCATE_PLUGIN_PATH - assumed 'WPJSOBFUSCATE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/javascript-obfuscator/admin/admin_settings.php on line 15
    • > PHP Warning
      require(WPJSOBFUSCATE_PLUGIN_PATHincludes/class.settings-api.php): failed to open stream: No such file or directory in wp-content/plugins/javascript-obfuscator/admin/admin_settings.php on line 15
    • > PHP Fatal error
      require(): Failed opening required 'WPJSOBFUSCATE_PLUGIN_PATHincludes/class.settings-api.php' (include_path='.:/usr/share/php') in wp-content/plugins/javascript-obfuscator/admin/admin_settings.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

javascript-obfuscator/javascript-obfuscator.php 85% from 13 tests

The main PHP file in "Javascript Obfuscator" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 179 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 detected1,592 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP123596611,474
JSON30088
Markdown18030

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.62
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods102
▷ Static methods65.88%
▷ Public methods7068.63%
▷ Protected methods00.00%
▷ Private methods3231.37%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants12
▷ Global constants216.67%
▷ Class constants1083.33%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin