62% universal-mobile-app

Code Review | Universal Network Web Mobile Ads

WordPress plugin Universal Network Web Mobile Ads scored62%from 54 tests.

About plugin

  • Plugin page: universal-mobile-app
  • Plugin version: 1.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: May 18, 2017
  • Number of updates: 41
  • Update frequency: every 4.2 days
  • Top authors: myappfree (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /727 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.69MB] [CPU: ▼51.20ms] Passed 4 tests

A check of server-side resources used by Universal Network Web Mobile Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.176.14 ▼37.53
Dashboard /wp-admin2.32 ▼0.998.74 ▼43.30
Posts /wp-admin/edit.php2.32 ▼1.049.95 ▼40.07
Add New Post /wp-admin/post-new.php2.32 ▼3.5710.30 ▼83.90
Media Library /wp-admin/upload.php2.32 ▼0.9110.29 ▼28.80
Universal App /wp-admin/admin.php?page=Universal_post2.327.90
Social /wp-admin/admin.php?page=universal_admin_social_page2.329.70
Categories /wp-admin/admin.php?page=universal_app_categories2.3210.47
Debug /wp-admin/admin.php?page=universal_app_debug2.329.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Universal Network Web Mobile Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲6714.84 ▲0.531.85 ▼0.7438.34 ▼6.75
Dashboard /wp-admin2,256 ▲535.85 ▲0.0498.36 ▼10.2739.55 ▼1.99
Posts /wp-admin/edit.php2,138 ▲412.00 ▼0.0539.61 ▲3.4338.21 ▲2.02
Add New Post /wp-admin/post-new.php1,558 ▲1217.46 ▼5.65646.65 ▼55.6464.91 ▲6.01
Media Library /wp-admin/upload.php1,438 ▲354.19 ▼0.02106.32 ▼0.5247.28 ▼0.61
Universal App /wp-admin/admin.php?page=Universal_post1,1472.0322.7529.90
Social /wp-admin/admin.php?page=universal_admin_social_page9072.0622.9531.84
Categories /wp-admin/admin.php?page=universal_app_categories9162.1923.4934.56
Debug /wp-admin/admin.php?page=universal_app_debug9512.0327.3331.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the universal-app-admin-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% 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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=universal_app_debug
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the universal-app-admin-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=universal_app_categories
    • > Warning in wp-content/plugins/universal-mobile-app/view/admin/categories.php+113
    array_key_exists() expects parameter 2 to be array, bool given

SRP 0% 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
Almost there! Just fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/universal-mobile-app/view/admin/categories.php
    • > /wp-content/plugins/universal-mobile-app/view/public/small_interstitial.php
    • > /wp-content/plugins/universal-mobile-app/view/public/small_banner_top.php
    • > /wp-content/plugins/universal-mobile-app/view/admin/cron-gui.php
    • > /wp-content/plugins/universal-mobile-app/view/admin/debug.php
    • > /wp-content/plugins/universal-mobile-app/view/admin/social-settings.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/universal-mobile-app/universal-mobile-ads.php:173
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/universal-mobile-app/fb-api.php:4

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === universal-mobile-app === )
  • Screenshots: Add images for these screenshots: #1 (Mobile ads shown on android device.), #2 (Screenshot of the administration panel)
The official readme.txt might help

universal-mobile-app/universal-mobile-ads.php 92% from 13 tests

This is the main PHP file of "Universal Network Web Mobile Ads" version 1.6.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("universal-mobile-app.php" instead of "universal-mobile-ads.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
There were no executable files found in this plugin2,157 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP11270701,341
JavaScript19144361
CSS33914299
PO File24042156

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.75
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png140.34KB44.76KB▼ 68.11%
assets/screenshot-2.png48.11KB27.96KB▼ 41.88%
img/Universal.png0.69KB0.62KB▼ 9.38%