74% push-notifications-ios

Code Review | Push Notification iOS

WordPress plugin Push Notification iOS scored74%from 54 tests.

About plugin

  • Plugin page: push-notification...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 12, 2013
  • Latest release: Nov 22, 2013
  • Number of updates: 16
  • Update frequency: every 1.4 days
  • Top authors: zedamin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,262 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.47ms] Passed 4 tests

Server-side resources used by Push Notification iOS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.21 ▼9.75
Dashboard /wp-admin3.37 ▲0.0751.99 ▲3.44
Posts /wp-admin/edit.php3.49 ▲0.1453.92 ▲10.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.11 ▼12.91
Media Library /wp-admin/upload.php3.28 ▲0.0535.03 ▲5.34

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: 2 new tables, 6 new options
New tables
wp_pn_apns_devices
wp_pn_setting
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Push Notification iOS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲21614.85 ▲0.551.76 ▼0.1339.86 ▼5.49
Dashboard /wp-admin2,342 ▲1516.41 ▲1.54139.41 ▲33.3096.32 ▲53.06
Posts /wp-admin/edit.php2,263 ▲1743.39 ▲1.3952.12 ▲10.1567.29 ▲29.07
Add New Post /wp-admin/post-new.php1,681 ▲14821.99 ▼1.22749.93 ▲70.7737.89 ▼11.36
Media Library /wp-admin/upload.php1,393 ▲54.01 ▼0.2198.16 ▼2.5579.74 ▲32.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_pn_apns_devices
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/push-notifications-ios/register_user_device.php on line 9
    • > PHP Warning
      require_once(wp-config.php): failed to open stream: No such file or directory in wp-content/plugins/push-notifications-ios/register_user_device.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/push-notifications-ios/push_notifications.php:484

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: ios, push notifications, iphone, ipad, ipod touch

push-notifications-ios/push_notifications.php 92% from 13 tests

Analyzing the main PHP file in "Push Notification iOS" version 0.3
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("push-notifications-ios.php" instead of "push_notifications.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin822 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS22736397
PHP314553371
JavaScript131254

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/images/icon-sprite.png2.24KB2.25KB0.00%
img/logo.png5.61KB2.61KB▼ 53.36%
img/icon.png0.52KB0.49KB▼ 6.93%
styles/images/icon-sprite@2x.png4.05KB4.21KB0.00%