68% mobile-app

Code Review | Mobile App Canvas Plugin - Convert your Website Into an App for iOS and Android

WordPress plugin Mobile App Canvas Plugin - Convert your Website Into an App for iOS and Android scored 68% from 54 tests.

About plugin

  • Plugin page: mobile-app
  • Plugin version: 3.5.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2016
  • Latest release: Aug 10, 2023
  • Number of updates: 112
  • Update frequency: every 21.7 days
  • Top authors: xsvet (40.18%)vitorargos (35.71%)psac50 (19.64%)georgespetrequin (4.46%)kaavyaiyer (2.68%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active / 33,373 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.51MB] [CPU: ▲3.72ms] Passed 4 tests

An overview of server-side resources used by Mobile App Canvas Plugin - Convert your Website Into an App for iOS and Android
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2940.13 ▲0.71
Dashboard /wp-admin3.89 ▲0.5952.57 ▲7.58
Posts /wp-admin/edit.php3.95 ▲0.5956.52 ▲8.72
Add New Post /wp-admin/post-new.php6.47 ▲0.5899.96 ▼2.12
Media Library /wp-admin/upload.php3.82 ▲0.5944.66 ▲11.69

Server storage [IO: ▲9.98MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 127 new files
Database: 1 new table, 18 new options
New tables
wp_canvas_notifications
New WordPress options
canvas-generated-existing-login-html-template-complete
widget_recent-posts
canvas-generated-existing-registration-html-template-complete
canvas-api_version
can_compress_scripts
widget_theysaidso_widget
canvas-generated-existing-registration-html-template
canvas-generated-existing-login-html-template
canvas-ps_mentions_posts
canvas-generated-existing-css-template-complete
...

Browser metrics Passed 4 tests

Mobile App Canvas Plugin - Convert your Website Into an App for iOS and Android: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲23713.91 ▼0.381.75 ▼0.2541.43 ▼3.45
Dashboard /wp-admin2,403 ▲2125.14 ▲0.17102.38 ▲1.8183.44 ▲37.30
Posts /wp-admin/edit.php2,290 ▲2042.30 ▲0.2540.89 ▲1.5239.51 ▲3.79
Add New Post /wp-admin/post-new.php1,568 ▲3423.72 ▲0.58681.28 ▲53.3048.12 ▼10.30
Media Library /wp-admin/upload.php1,576 ▲1914.52 ▲0.35101.08 ▲0.7281.88 ▲39.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_canvas_notifications
  • The uninstall procedure has failed, leaving 18 options in the database
    • can_compress_scripts
    • canvas-generated-existing-registration-html-template
    • canvas-generated-existing-registration-html-template-complete
    • canvas-ps_friends
    • canvas-ps_mentions_comments
    • canvas-generated-existing-css-template
    • widget_recent-posts
    • canvas-generated-existing-css-template-complete
    • db_upgraded
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/mobile-app/views/header.php
    • > /wp-content/plugins/mobile-app/api/registration.php
    • > /wp-content/plugins/mobile-app/views/footer.php
    • > /wp-content/plugins/mobile-app/api/forgot-password.php
    • > /wp-content/plugins/mobile-app/api/login.php
    • > /wp-content/plugins/mobile-app/views/login-registration/parts/loading-icon.php
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require(CANVAS_DIRviews/login-registration/parts/loading-icon.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-app/views/login-registration/registration-template.php on line 5
    • > PHP Fatal error
      require(): Failed opening required 'CANVAS_DIRviews/login-registration/parts/loading-icon.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-app/views/login-registration/login-template.php on line 5
    • > PHP Warning
      Use of undefined constant CANVAS_DIR - assumed 'CANVAS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobile-app/api/loginstate.php on line 7
    • > PHP Fatal error
      require(): Failed opening required 'CANVAS_DIRviews/login-registration/parts/loading-icon.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-app/views/login-registration/registration-template.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mobile-app/views/settings-push.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mobile-app/views/login-registration/footer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobile-app/core/canvas_woo.class.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'CanvasAdmin' not found in wp-content/plugins/mobile-app/views/first_time.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'CANVAS_DIRcore/canvas_theme.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/mobile-app/api/loginstate.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mobile-app/views/settings-canvas-login-registration.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 94% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

mobile-app/canvas.php 85% from 13 tests

The main PHP script in "Mobile App Canvas Plugin - Convert your Website Into an App for iOS and Android" version 3.5.11 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("mobile-app.php" instead of "canvas.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
Success! There were no dangerous files found in this plugin89,795 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
CSS243,3066,29828,630
JSON20027,983
JavaScript135,57012,61421,040
SVG8047,029
PHP457321,0704,412
TypeScript180840373
Sass4570328

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity25.42
▷ Minimum class complexity2.00
▷ Maximum class complexity93.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods163
▷ Static methods11469.94%
▷ Public methods13884.66%
▷ Protected methods63.68%
▷ Private methods1911.66%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/libs/chosen/chosen-sprite.png0.63KB0.88KB0.00%
assets/libs/chosen/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
assets/img/welcome.png25.03KB11.72KB▼ 53.19%
assets/img/link.png0.34KB0.48KB0.00%
assets/img/list.png0.43KB0.47KB0.00%