84% pusher-pushing-mobile-notifications-with-fcm

Code Review | Pusher - Pushing mobile notification with FCM

WordPress plugin Pusher - Pushing mobile notification with FCM scored84%from 54 tests.

About plugin

  • Plugin page: pusher-pushing-mo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.2
  • WordPress version: 6.3.1
  • First release: May 22, 2021
  • Latest release: May 22, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: kyazici (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /557 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼3.69ms] Passed 4 tests

Analyzing server-side resources used by Pusher - Pushing mobile notification with FCM
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.33 ▲1.56
Dashboard /wp-admin3.31 ▲0.0155.86 ▲0.55
Posts /wp-admin/edit.php3.36 ▲0.0145.68 ▼14.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.79 ▼2.41
Media Library /wp-admin/upload.php3.23 ▲0.0138.69 ▲1.92

Server storage [IO: ▲0.15MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Pusher - Pushing mobile notification with FCM: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.37 ▼0.021.93 ▼0.1743.67 ▼1.83
Dashboard /wp-admin2,204 ▲365.56 ▼0.0789.98 ▲3.8664.59 ▲19.35
Posts /wp-admin/edit.php2,118 ▲182.04 ▲0.0436.65 ▲0.5436.34 ▼0.34
Add New Post /wp-admin/post-new.php1,698 ▲14222.47 ▲4.14719.19 ▲75.4854.09 ▲0.02
Media Library /wp-admin/upload.php1,421 ▲244.20 ▼0.15100.80 ▼0.3173.27 ▲24.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include(): Failed opening 'PUSHERFCM_ROOTincludes/Helpers/menus/dashboard.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/content.php on line 3
    • > PHP Warning
      include(PUSHERFCM_ROOTincludes/Helpers/menus/side.php): failed to open stream: No such file or directory in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/content.php on line 4
    • > PHP Warning
      include(): Failed opening 'PUSHERFCM_ROOTincludes/Helpers/menus/side.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/content.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/actions.php:3
    • > PHP Warning
      include(PUSHERFCM_ROOTincludes/Helpers/menus/dashboard.php): failed to open stream: No such file or directory in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/content.php on line 3
    • > PHP Warning
      Use of undefined constant PUSHERFCM_ROOT - assumed 'PUSHERFCM_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/content.php on line 3
    • > PHP Warning
      Use of undefined constant PUSHERFCM_ROOT - assumed 'PUSHERFCM_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/pusher-pushing-mobile-notifications-with-fcm/includes/Helpers/content.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: ios, notification, mobile, android, firebase

pusher-pushing-mobile-notifications-with-fcm/pusher.php 85% from 13 tests

The main PHP file in "Pusher - Pushing mobile notification with FCM" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("pusher-pushing-mobile-notifications-with-fcm.php" instead of "pusher.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected411 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP114127350
CSS112061

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.50
▷ Minimum class complexity5.00
▷ Maximum class complexity8.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/smi.png1.87KB0.70KB▼ 62.74%
includes/assets/error.png1.92KB1.10KB▼ 43.07%
includes/assets/postoff.png13.73KB10.28KB▼ 25.16%
includes/assets/check.png1.94KB0.73KB▼ 62.38%
includes/assets/post.png11.54KB5.10KB▼ 55.83%