10% yournewsapp

Code Review | Blappsta Mobile App Plugin - Your native, mobile iPhone App and Android App

WordPress plugin Blappsta Mobile App Plugin - Your native, mobile iPhone App and Android App scored10%from 54 tests.

About plugin

  • Plugin page: yournewsapp
  • Plugin version: 0.8.8.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Jan 17, 2014
  • Latest release: Jun 26, 2018
  • Number of updates: 138
  • Update frequency: every 11.8 days
  • Top authors: nebelhorn (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active /50,162 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+4650
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.17ms] Passed 4 tests

An overview of server-side resources used by Blappsta Mobile App Plugin - Your native, mobile iPhone App and Android App
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.70 ▼31.94
Dashboard /wp-admin2.12 ▼1.225.66 ▼52.85
Posts /wp-admin/edit.php2.12 ▼1.235.00 ▼41.68
Add New Post /wp-admin/post-new.php2.12 ▼3.765.17 ▼90.19
Media Library /wp-admin/upload.php2.12 ▼1.104.45 ▼30.07
Blappsta Plugin /wp-admin/options-general.php?page=nh_ynaa_plugin_options2.126.05

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 97 new files
Database: 1 new table, 26 new options
New tables
wp_nh_locations
New WordPress options
can_compress_scripts
nh_ynaa_homepreset_settings_ts
nh_ynaa_db_version
nh_ynaa_blappsta
nh_ynaa_blappsta_ts
widget_recent-posts
nh_ynaa_push_settings
nh_ynaa_general_settings
nh_ynaa_teaser_settings_ts
nh_ynaa_categories_settings_ts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Blappsta Mobile App Plugin - Your native, mobile iPhone App and Android App
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲4213.30 ▼0.991.60 ▼0.2844.74 ▲3.57
Dashboard /wp-admin2,214 ▲264.89 ▼0.1996.68 ▼8.5537.63 ▼6.50
Posts /wp-admin/edit.php2,104 ▲152.28 ▲0.2333.14 ▼6.2234.04 ▲0.71
Add New Post /wp-admin/post-new.php6,249 ▲4,70726.18 ▲8.04901.43 ▲251.5258.48 ▼0.55
Media Library /wp-admin/upload.php1,402 ▲144.31 ▲0.1193.83 ▼5.0643.36 ▲0.40
Blappsta Plugin /wp-admin/options-general.php?page=nh_ynaa_plugin_options2,2628.94232.3136.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+4650
    Function create_function() is deprecated
  • Zombie tables were found after uninstall: 1 table
    • wp_nh_locations
  • The uninstall procedure has failed, leaving 26 options in the database
    • nh_ynaa_css_settings
    • nh_ynaa_push_settings_ts
    • nh_ynaa_general_settings
    • nh_ynaa_articles_ts
    • nh_ynaa_css_settings_ts
    • nh_ynaa_categories_settings
    • nh_ynaa_menu_settings_ts
    • nh_ynaa_teaser_settings
    • widget_recent-posts
    • nh_ynaa_db_version
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Deprecated in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+4650
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in NH_Blappsta_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+660
    Undefined index: eventplugin
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1574
    Undefined index: settings-updated
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1623
    Undefined property: NH_YNAA_Plugin::$admin_page
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1204
    Undefined index: social_fbsecretid
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1204
    Undefined index: social_fbappid
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1204
    Undefined index: social_fbid
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: hidesharing
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: hidedate
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1471
    Undefined index: textToSpeech
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Warning in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1485
    in_array() expects parameter 2 to be array, null given
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1390
    Undefined variable: aktiveventplugis
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: location
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: nogallery
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: gadgetry
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1204
    Undefined index: gaTrackID
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: blank_lines
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: utf8
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: json_embedded
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: domcontent
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+1440
    Undefined index: debug
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Notice in wp-content/plugins/yournewsapp/nh_ynaa_plugin.php+4558
    Trying to get property 'ID' of non-object

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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/yournewsapp/pushScript.php
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: debug in wp-content/plugins/yournewsapp/include/nh_ynaa_settings.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yournewsapp/include/nh_ynaa_homepresets.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/yournewsapp/include/teaser.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/yournewsapp/include/nh_ynaa_categories.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yournewsapp/classes/nh-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/yournewsapp/include/nh_ynaa_get_appcontent.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_categories() in wp-content/plugins/yournewsapp/include/nh_ynaa_categories_settings_desc_.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/yournewsapp/include/nh_the_home_content.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/yournewsapp/facebook-php-sdk-master/tests/tests.php:18
    • > PHP Notice
      Constant APPKEY already defined in wp-content/plugins/yournewsapp/pushScript.php on line 11

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)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Network (severe)
    https://assets.zendesk.com/external/zenbox/v2.6/zenbox.js - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Network (severe)
    https://assets.zendesk.com/external/zenbox/v2.6/zenbox.css - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/yournewsapp/js/ynaa.js?ver=1.1:76:46)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=nh_ynaa_plugin_options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Screenshot #1 (Settings page of the plugin) image missing
  • Tags: There are too many tags (87 tag instead of maximum 10)
The official readme.txt might help

yournewsapp/nh_ynaa_plugin.php 92% from 13 tests

"Blappsta Mobile App Plugin - Your native, mobile iPhone App and Android App" version 0.8.8.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yournewsapp.php" instead of "nh_ynaa_plugin.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please make sure to remedy the following
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/yournewsapp/facebook-php-sdk-master/src/fb_ca_chain_bundle.crt
16,258 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP371,5102,01510,189
SVG6003,860
CSS617768769
PO File1337525719
JavaScript5162168589
Markdown2340101
JSON10025
YAML1006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity38.80
▷ Minimum class complexity1.00
▷ Maximum class complexity587.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods374
▷ Static methods236.15%
▷ Public methods28977.27%
▷ Protected methods5414.44%
▷ Private methods318.29%
Functions22
▷ Named functions522.73%
▷ Anonymous functions1777.27%
Constants21
▷ Global constants1047.62%
▷ Class constants1152.38%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/widgets/icon-window.png4.97KB2.94KB▼ 40.79%
img/widgets/apple_store_de.png4.64KB2.43KB▼ 47.64%
img/widgets/apple_store_en.png5.19KB2.77KB▼ 46.67%
img/blappsta_title.png8.38KB4.92KB▼ 41.33%
img/placeholder.png3.86KB2.15KB▼ 44.30%