48% outshifter-export

Code Review | Reachu Export

WordPress plugin Reachu Export scored48%from 54 tests.

About plugin

  • Plugin page: outshifter-export
  • Plugin version: 3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 21, 2020
  • Latest release: Nov 29, 2023
  • Number of updates: 64
  • Update frequency: every 19.2 days
  • Top authors: outshifter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,095 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▲0.04ms] Passed 4 tests

This is a short check of server-side resources used by Reachu Export
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5539.13 ▼2.31
Dashboard /wp-admin3.84 ▲0.5448.82 ▲0.07
Posts /wp-admin/edit.php3.90 ▲0.5448.56 ▼0.49
Add New Post /wp-admin/post-new.php6.36 ▲0.4892.46 ▲5.77
Media Library /wp-admin/upload.php3.77 ▲0.5434.56 ▲2.88

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,000 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Reachu Export
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3014.07 ▼0.271.65 ▼0.0535.30 ▼8.09
Dashboard /wp-admin2,197 ▲205.61 ▲0.0191.39 ▼13.8040.39 ▼3.42
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0639.66 ▼0.2136.36 ▼1.97
Add New Post /wp-admin/post-new.php1,528 ▼123.03 ▼0.38579.11 ▼3.9148.16 ▼8.91
Media Library /wp-admin/upload.php1,402 ▼14.22 ▲0.0495.92 ▼1.4540.49 ▼3.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/outshifter-export/index.php+151
    Uncaught Error: Call to undefined function wc_get_logger() in wp-content/plugins/outshifter-export/index.php:151
    Stack trace:
    #0 wp-content/plugins/outshifter-export/index.php(93): OSEWCPHJC_reachuSync::log()
    #1 wp-content/plugins/outshifter-export/index.php(139): OSEWCPHJC_reachuSync::remove_webhook()
    #2 wp-content/plugins/outshifter-export/index.php(85): OSEWCPHJC_reachuSync::plugin_uninstall()
    #3 wp-includes/class-wp-hook.php(310): OSEWCPHJC_reachuSync::{closure}()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/includes/plugin.php(816): do_action()
  • This plugin has failed uninstalling correctly, leaving 1,000 files (3.45MB) in the plugin directory
    • (new file) js/script.js
    • (new file) css/index.css
    • (new file) img/check.png
    • (new file) img/icon.png
    • (new file) vendor/autoload.php
    • (new file) img/icon.svg
    • (new file) README.txt
    • (new file) vendor/bin/google-cloud-batch
    • (new file) index.php
    • (new file) js/settings-reachu.js
    • ...
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • wc_reachu_password
    • firebaseUserId
    • widget_recent-comments
    • can_compress_scripts
    • wc_reachu_currency
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • wc_reachu_apikey
    • widget_theysaidso_widget
    • wc_reachu_user
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/outshifter-export/vendor/bin/jp.php
    • > /wp-content/plugins/outshifter-export/vendor/mtdowling/jmespath.php/bin/jp.php
  • 459× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/outshifter-export/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/outshifter-export/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Cache\\CacheException' not found in wp-content/plugins/outshifter-export/vendor/psr/cache/src/InvalidArgumentException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Kreait\\Firebase\\Exception\\AuthException' not found in wp-content/plugins/outshifter-export/vendor/kreait/firebase-php/src/Firebase/Exception/Auth/ExpiredOobCode.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/outshifter-export/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'Prophecy\\Argument\\Token\\TokenInterface' not found in wp-content/plugins/outshifter-export/vendor/google/cloud-core/src/Testing/ArrayHasSameValuesToken.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/outshifter-export/vendor/google/auth/src/Credentials/GCECredentials.php:57
    • > PHP Fatal error
      Trait 'Google\\Cloud\\Core\\Batch\\BatchDaemonTrait' not found in wp-content/plugins/outshifter-export/vendor/google/cloud-core/src/Batch/SimpleJobTrait.php on line 30
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/outshifter-export/vendor/google/cloud-storage/src/WriteStream.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/outshifter-export/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

outshifter-export/index.php 92% from 13 tests

The main PHP file in "Reachu Export" ver. 3.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("outshifter-export.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/outshifter-export/vendor/bin/google-cloud-batch.bat
      • wp-content/plugins/outshifter-export/vendor/bin/jp.php.bat
70,582 lines of code in 940 files:
LanguageFilesBlank linesComment linesLines of code
PHP80911,66832,25650,324
JSON5512013,598
Markdown481,97405,656
XSLT22320209
YAML6182148
JavaScript260145
C23570132
CSS115083
make3231664
reStructuredText1352959
XML35053
m41111438
C/C++ Header1101825
Bourne Shell271724
Dockerfile18010
DOS Batch2008
SVG1006

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.06
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces115
Interfaces83
Traits55
Classes641
▷ Abstract classes192.96%
▷ Concrete classes62297.04%
▷ Final classes19831.83%
Methods4,082
▷ Static methods44210.83%
▷ Public methods3,22679.03%
▷ Protected methods2225.44%
▷ Private methods63415.53%
Functions356
▷ Named functions11732.87%
▷ Anonymous functions23967.13%
Constants457
▷ Global constants5912.91%
▷ Class constants39887.09%
▷ Public constants37894.97%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/check.png15.15KB15.15KB0.01%
img/icon.png0.19KB0.17KB▼ 8.42%