78% integrate-firebase

Code Review | Integrate Firebase

WordPress plugin Integrate Firebase scored78%from 54 tests.

About plugin

  • Plugin page: integrate-firebase
  • Plugin version: 0.9.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.9
  • WordPress version: 6.3.1
  • First release: May 28, 2018
  • Latest release: Jan 31, 2022
  • Number of updates: 22
  • Update frequency: every 61.1 days
  • Top authors: hanthuy (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

1,000+ active /20,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.15MB] [CPU: ▼21.51ms] Passed 4 tests

Server-side resources used by Integrate Firebase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0523.98 ▼14.17
Dashboard /wp-admin3.20 ▼0.1129.49 ▼18.58
Posts /wp-admin/edit.php3.28 ▼0.0831.39 ▼19.14
Add New Post /wp-admin/post-new.php5.52 ▼0.3765.18 ▼34.13
Media Library /wp-admin/upload.php3.23 ▼0.0126.80 ▼9.76
Firebase /wp-admin/options-general.php?page=firebase-setting3.1226.58

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Integrate Firebase
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲23215.99 ▲1.6811.86 ▲10.0837.35 ▼10.43
Dashboard /wp-admin2,227 ▲366.25 ▲1.36110.14 ▲4.4342.52 ▼2.48
Posts /wp-admin/edit.php2,110 ▲183.35 ▲1.3556.13 ▲16.6136.25 ▼1.85
Add New Post /wp-admin/post-new.php1,534 ▲124.11 ▲0.96650.73 ▲55.2035.35 ▼20.17
Media Library /wp-admin/upload.php1,409 ▲215.66 ▲1.4499.59 ▲0.2342.41 ▼1.59
Firebase /wp-admin/options-general.php?page=firebase-setting8522.8430.7427.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=firebase-setting
    • > Notice in wp-content/plugins/integrate-firebase/includes/class.firebase-admin.php+64
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/integrate-firebase/init.php

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: You can take inspiration from this readme.txt

integrate-firebase/init.php 92% from 13 tests

Analyzing the main PHP file in "Integrate Firebase" version 0.9.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("integrate-firebase.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected729 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP682103391
JavaScript22214209
Markdown3910122
CSS2117

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.33
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods30100.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png51.07KB20.05KB▼ 60.74%
assets/screenshot-3.png31.43KB15.61KB▼ 50.34%
assets/screenshot-2.png24.11KB12.12KB▼ 49.71%