68% fireauth

Code Review | Fireauth - Enable Firebase Authentication

WordPress plugin Fireauth - Enable Firebase Authentication scored 68% from 54 tests.

About plugin

  • Plugin page: fireauth
  • Plugin version: 1.3.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Dec 1, 2019
  • Number of updates: 15
  • Update frequency: every 0.4 days
  • Top authors: bcdilan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.68MB] [CPU: ▼7.28ms] Passed 4 tests

An overview of server-side resources used by Fireauth - Enable Firebase Authentication
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6840.15 ▼2.37
Dashboard /wp-admin3.99 ▲0.6948.28 ▼10.87
Posts /wp-admin/edit.php4.04 ▲0.6850.22 ▲1.73
Add New Post /wp-admin/post-new.php6.54 ▲0.6586.65 ▼17.60
Media Library /wp-admin/upload.php3.91 ▲0.6837.59 ▲3.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2,812 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_fireauth_login_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Fireauth - Enable Firebase Authentication
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲19713.60 ▼0.717.78 ▲5.9642.68 ▼11.17
Dashboard /wp-admin2,233 ▲485.86 ▼0.02109.03 ▲1.6639.48 ▼2.46
Posts /wp-admin/edit.php2,113 ▲422.04 ▲0.0139.51 ▲3.8235.60 ▲0.23
Add New Post /wp-admin/post-new.php1,535 ▲2123.53 ▲6.11632.67 ▼50.0550.72 ▼8.80
Media Library /wp-admin/upload.php1,415 ▲274.23 ▲0.0498.77 ▼45.5742.21 ▼10.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_fireauth_login_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fireauth/templates/api/auth.php
    • > /wp-content/plugins/fireauth/vendor/mustache/mustache/bin/build_bootstrap.php
    • > /wp-content/plugins/fireauth/vendor/riverline/multipart-parser/tests/bootstrap.php
  • 667× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/fireauth/vendor/kreait/firebase-php/src/Firebase/DynamicLink/ShortenLongDynamicLink/ApiRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fireauth/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Kreait\\Firebase\\Value' not found in wp-content/plugins/fireauth/vendor/kreait/firebase-php/src/Firebase/Value/PhoneNumber.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Riverline\\MultiPartParser\\Converters\\Commun' not found in wp-content/plugins/fireauth/vendor/riverline/multipart-parser/tests/Riverline/MultiPartParser/Converters/HttpFoundationTest.php:20
    • > PHP Warning
      include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/fireauth/vendor/google/crc32/tests/GoogleTest.php on line 18
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Event\\SubscriberInterface' not found in wp-content/plugins/fireauth/vendor/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php:38
    • > PHP Fatal error
      Trait 'Google\\Cloud\\Core\\ArrayTrait' not found in wp-content/plugins/fireauth/vendor/google/cloud-core/src/GrpcTrait.php on line 29
    • > PHP Fatal error
      Uncaught Error: Interface 'Kreait\\Firebase\\Exception\\MessagingException' not found in wp-content/plugins/fireauth/vendor/kreait/firebase-php/src/Firebase/Exception/Messaging/InvalidArgument.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fireauth/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/fireauth/vendor/guzzlehttp/psr7/src/ServerRequest.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: social, auth, firebase

fireauth/fireauth.php Passed 13 tests

The principal PHP file in "Fireauth - Enable Firebase Authentication" v. 1.3.3.1 is loaded by WordPress automatically on each request
31 characters long description:
Plugin Firebase Authentication.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .ms - Maxwell Script in Maxwell Render
      • wp-content/plugins/fireauth/vendor/mustache/mustache/test/fixtures/templates/alpha.ms
      • wp-content/plugins/fireauth/vendor/mustache/mustache/test/fixtures/templates/beta.ms
627,490 lines of code in 2,568 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,35918,14957,389605,633
JSON5713013,639
Markdown692,52506,683
YAML15523403
XSLT22320209
Mustache3710163
XML8100159
C23570132
CSS2170116
make4261676
reStructuredText1352959
Ant112055
SVG20255
m41111438
C/C++ Header1101825
JavaScript410320
Bourne Shell141614
Dockerfile18010
HTML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.58
▷ Minimum class complexity1.00
▷ Maximum class complexity367.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces146
Interfaces103
Traits64
Classes915
▷ Abstract classes343.72%
▷ Concrete classes88196.28%
▷ Final classes16518.73%
Methods5,594
▷ Static methods4548.12%
▷ Public methods4,49580.35%
▷ Protected methods4437.92%
▷ Private methods65611.73%
Functions341
▷ Named functions6920.23%
▷ Anonymous functions27279.77%
Constants585
▷ Global constants50.85%
▷ Class constants58099.15%
▷ Public constants56196.72%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.67MB with 0.39MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png35.17KB14.76KB▼ 58.03%
assets/icon-128x128.png12.30KB5.80KB▼ 52.86%
assets/screenshot-1.png547.96KB250.13KB▼ 54.35%
assets/imgs/fireauth.png93.38KB33.13KB▼ 64.52%