88% miniorange-php-guard

Code Review | WordPress Obfuscator (PHP Obfuscator)

WordPress plugin WordPress Obfuscator (PHP Obfuscator) scored 88% from 54 tests.

About plugin

  • Plugin page: miniorange-php-guard
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 5.9.2
  • First release: Mar 11, 2019
  • Latest release: Nov 17, 2021
  • Number of updates: 11
  • Update frequency: every 89.7 days
  • Top authors: cyberlord92 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,705 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼295.37ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Obfuscator (PHP Obfuscator)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1454.30 ▲3.15
Dashboard /wp-admin3.50 ▲0.0934.24 ▲0.35
Posts /wp-admin/edit.php3.72 ▲0.0838.29 ▼4.71
Add New Post /wp-admin/post-new.php6.96 ▼0.0194.01 ▼1,178.86
Media Library /wp-admin/upload.php3.37 ▲0.0825.63 ▲1.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 1,038 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Obfuscator (PHP Obfuscator)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲6716.22 ▲0.476.45 ▲0.232.57 ▲0.38
Dashboard /wp-admin2,913 ▲526.16 ▲0.06116.45 ▼16.07175.78 ▲12.61
Posts /wp-admin/edit.php2,715 ▲273.26 ▲0.0266.57 ▼0.62140.27 ▲0.16
Add New Post /wp-admin/post-new.php1,738 ▲7722.13 ▲5.47423.85 ▼13.25159.74 ▼2.83
Media Library /wp-admin/upload.php1,722 ▲245.63 ▲0.09125.74 ▼17.78204.27 ▲15.69

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 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/test_old/run.php
    • > /wp-content/plugins/miniorange-php-guard/vendor/nikic/php-parser/grammar/rebuildParsers.php
    • > /wp-content/plugins/miniorange-php-guard/vendor/nikic/php-parser/test_old/run.php
    • > /wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/grammar/rebuildParsers.php
    • > /wp-content/plugins/miniorange-php-guard/miniorange-php-guard/yakpro-po/include/check_version.php
    • > /wp-content/plugins/miniorange-php-guard/yakpro-po/include/check_version.php
  • 520× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/miniorange-php-guard/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\BinaryOp' not found in wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\AssignOp' not found in wp-content/plugins/miniorange-php-guard/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/miniorange-php-guard/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/miniorange-php-guard/miniorange-php-guard/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/miniorange-php-guard/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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: protect php code, obfuscator, php guard, obfuscate, obfuscation

miniorange-php-guard/class-mo-php-guard.php 92% from 13 tests

The primary PHP file in "WordPress Obfuscator (PHP Obfuscator)" version 2.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("miniorange-php-guard.php" instead of "class-mo-php-guard.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin26,812 lines of code in 324 files:
LanguageFilesBlank linesComment linesLines of code
PHP2903,2594,56121,020
Markdown2387302,995
yacc3297121,836
CSS22611831
JSON20085
YAML16024
XML12016
Bourne Shell1004
JavaScript1081

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 277)
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity295.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity277.00
Code structure
Namespaces21
Interfaces16
Traits2
Classes538
▷ Abstract classes325.95%
▷ Concrete classes50694.05%
▷ Final classes40.79%
Methods2,570
▷ Static methods622.41%
▷ Public methods1,95275.95%
▷ Protected methods49819.38%
▷ Private methods1204.67%
Functions2,330
▷ Named functions903.86%
▷ Anonymous functions2,24096.14%
Constants400
▷ Global constants123.00%
▷ Class constants38897.00%
▷ Public constants388100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags16.png61.80KB19.90KB▼ 67.79%
miniorange-php-guard/images/miniorange.png0.44KB0.35KB▼ 18.61%
miniorange-php-guard/images/flags16.png61.80KB19.90KB▼ 67.79%
images/miniorange.png0.44KB0.35KB▼ 18.61%
miniorange-php-guard/images/logo.png2.84KB1.59KB▼ 44.03%