62% pd-android-fcm

Code Review | pd Android FCM Push Notification

WordPress plugin pd Android FCM Push Notification scored62%from 54 tests.

About plugin

  • Plugin page: pd-android-fcm
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Jun 23, 2018
  • Latest release: Nov 4, 2020
  • Number of updates: 58
  • Update frequency: every 15.0 days
  • Top authors: proficientdesigners (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /6,690 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼5.96ms] Passed 4 tests

Analyzing server-side resources used by pd Android FCM Push Notification
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2038.51 ▼12.72
Dashboard /wp-admin3.51 ▲0.2048.54 ▼3.98
Posts /wp-admin/edit.php3.63 ▲0.2752.41 ▲0.25
Add New Post /wp-admin/post-new.php6.12 ▲0.2385.35 ▼7.40
Media Library /wp-admin/upload.php3.43 ▲0.2036.11 ▲1.95
Push Notifications /wp-admin/edit.php?post_type=pdandroidfcm_msg3.4839.90
Subscriptions /wp-admin/edit-tags.php?taxonomy=subscriptions&post_type=pdandroidfcm3.4335.42
Settings /wp-admin/edit.php?post_type=pdandroidfcm&page=settings3.4031.97
All Devices /wp-admin/edit.php?post_type=pdandroidfcm3.4834.00

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: 1 new table, 7 new options
New tables
wp_pd_android_fcm
New WordPress options
can_compress_scripts
widget_theysaidso_widget
pd_android_fcm_db_version
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

pd Android FCM Push Notification: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.21 ▼1.164.26 ▲2.4638.69 ▼8.85
Dashboard /wp-admin2,287 ▲995.85 ▲0.95101.00 ▼13.7638.84 ▼4.25
Posts /wp-admin/edit.php2,183 ▲942.04 ▼0.0937.88 ▲2.3034.50 ▼2.56
Add New Post /wp-admin/post-new.php6,250 ▲4,71725.88 ▲3.01883.78 ▲249.6357.57 ▲4.86
Media Library /wp-admin/upload.php1,472 ▲814.20 ▲0.0497.31 ▼1.7639.44 ▼3.67
Push Notifications /wp-admin/edit.php?post_type=pdandroidfcm_msg1,1471.9832.9929.49
Subscriptions /wp-admin/edit-tags.php?taxonomy=subscriptions&post_type=pdandroidfcm1,3482.1832.7330.10
Settings /wp-admin/edit.php?post_type=pdandroidfcm&page=settings9872.0423.0128.17
All Devices /wp-admin/edit.php?post_type=pdandroidfcm1,2411.9932.6028.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_pd_android_fcm
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • pd_android_fcm_db_version
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 13× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/pd-android-fcm/functions/func_misc.php
    • > /wp-content/plugins/pd-android-fcm/functions/func_rename.php
    • > /wp-content/plugins/pd-android-fcm/custom/custom_column.php
    • > /wp-content/plugins/pd-android-fcm/custom/custom_meta_box.php
    • > /wp-content/plugins/pd-android-fcm/functions/func_fcm_publish.php
    • > /wp-content/plugins/pd-android-fcm/class/class-firebase.php
    • > /wp-content/plugins/pd-android-fcm/class/class-push.php
    • > /wp-content/plugins/pd-android-fcm/wp_api/api-unsubscribe.php
    • > /wp-content/plugins/pd-android-fcm/settings.php
    • > /wp-content/plugins/pd-android-fcm/pages.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pd-android-fcm/ajax/generate_api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/pd-android-fcm/pd-android-fcm.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pd-android-fcm/functions/func_add_taxonomy.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=pdandroidfcm_msg
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=pdandroidfcm_msg 284:49 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    • > GET request to /wp-admin/edit-tags.php?taxonomy=subscriptions&post_type=pdandroidfcm
    • > Javascript (severe) in unknown
    /wp-admin/edit-tags.php?taxonomy=subscriptions&post_type=pdandroidfcm 369:49 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    • > GET request to /wp-admin/edit.php?post_type=pdandroidfcm
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=pdandroidfcm 288:49 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: google firebase cloud messaging service, android push notification, fcm, send push notification from wordpress site to android devices, firebase cloud messaging...

pd-android-fcm/pd-android-fcm.php 85% from 13 tests

The principal PHP file in "pd Android FCM Push Notification" v. 1.1.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 339 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.4.2")

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
Everything looks great! No dangerous files found in this plugin945 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP17223307945

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected