74% fusion-web-app

Code Review | Fusion Web App

WordPress plugin Fusion Web App scored74%from 54 tests.

About plugin

  • Plugin page: fusion-web-app
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.3
  • WordPress version: 6.3.1
  • First release: Jul 13, 2020
  • Latest release: Nov 24, 2020
  • Number of updates: 10
  • Update frequency: every 13.4 days
  • Top authors: maurohmartinez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.27MB] [CPU: ▼13.60ms] Passed 4 tests

An overview of server-side resources used by Fusion Web App
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4046.16 ▲6.19
Dashboard /wp-admin3.78 ▲0.4352.61 ▼8.33
Posts /wp-admin/edit.php3.81 ▲0.4655.54 ▲6.33
Add New Post /wp-admin/post-new.php3.54 ▼2.3441.63 ▼56.41
Media Library /wp-admin/upload.php3.65 ▲0.4345.09 ▲4.14
Screens /wp-admin/admin.php?page=fusion-web-app-screens3.5842.78
Recipients /wp-admin/admin.php?page=fusion-web-app-recipients3.5841.83
New Push /wp-admin/admin.php?page=fusion-web-app-send_new3.5737.90
All Notifications /wp-admin/admin.php?page=fusion-web-app3.5839.36
Register Screen /wp-admin/admin.php?page=fusion-web-app-register_new_app_screen3.5739.74

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: 3 new tables, 6 new options
New tables
wp_fusion_web_app_screens
wp_fusion_web_app_recipient_devices
wp_fusion_web_app_all
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Fusion Web App
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.35 ▲0.072.32 ▲0.7343.33 ▲0.45
Dashboard /wp-admin2,229 ▲495.66 ▼0.0195.35 ▲6.5140.44 ▼2.24
Posts /wp-admin/edit.php2,137 ▲342.02 ▼0.0337.77 ▲1.5238.59 ▲0.79
Add New Post /wp-admin/post-new.php1,555 ▲922.62 ▼0.78691.14 ▲18.9960.49 ▲3.90
Media Library /wp-admin/upload.php1,437 ▲404.24 ▼0.04112.99 ▲4.2649.26 ▲1.95
Screens /wp-admin/admin.php?page=fusion-web-app-screens1,0102.0328.0129.93
Recipients /wp-admin/admin.php?page=fusion-web-app-recipients9702.0625.5129.53
New Push /wp-admin/admin.php?page=fusion-web-app-send_new8922.1727.2827.86
All Notifications /wp-admin/admin.php?page=fusion-web-app9992.0628.8031.48
Register Screen /wp-admin/admin.php?page=fusion-web-app-register_new_app_screen8942.1723.1327.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_fusion_web_app_recipient_devices
    • wp_fusion_web_app_screens
    • wp_fusion_web_app_all
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fusion-web-app/templates/edit_app_screen.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fusion-web-app/templates/send_push.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fusion-web-app/templates/list-app-screens.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fusion-web-app/templates/list-all.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fusion-web-app/templates/list-recipients.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fusion-web-app/templates/register_app_screen.php:2
    • > PHP Warning
      Use of undefined constant FUSION_WA_ASSETS - assumed 'FUSION_WA_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/fusion-web-app/templates/list-all.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === fusion-web-app === )
Please take inspiration from this readme.txt

fusion-web-app/index.php 92% from 13 tests

The principal PHP file in "Fusion Web App" v. 1.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fusion-web-app.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,078 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP122476371,692
PO File21480382
JavaScript1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity34.80
▷ Minimum class complexity12.00
▷ Maximum class complexity85.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods99
▷ Static methods1515.15%
▷ Public methods7979.80%
▷ Protected methods00.00%
▷ Private methods2020.20%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants9
▷ Global constants9100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-fwa.png34.89KB14.95KB▼ 57.15%