68% mobile-app-api

Code Review | Mobile App API

WordPress plugin Mobile App API scored68%from 54 tests.

About plugin

  • Plugin page: mobile-app-api
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Mar 27, 2017
  • Number of updates: 63
  • Update frequency: every 10.7 days
  • Top authors: mobileappbuilder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /6,342 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.74MB] [CPU: ▼45.53ms] Passed 4 tests

Analyzing server-side resources used by Mobile App API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.25 ▼0.2218.37 ▼27.04
Dashboard /wp-admin3.28 ▼0.0619.42 ▼52.10
Posts /wp-admin/edit.php3.28 ▼0.0719.62 ▼29.36
Add New Post /wp-admin/post-new.php3.28 ▼2.6020.49 ▼73.62
Media Library /wp-admin/upload.php3.28 ▲0.0621.57 ▼16.34
Mobile App API /wp-admin/options-general.php?page=mobile-app-api3.2919.47

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Mobile App API: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼0.751.78 ▼0.1743.55 ▼0.65
Dashboard /wp-admin2,207 ▲164.81 ▼0.08103.66 ▼9.0342.06 ▲0.48
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0736.46 ▼1.6632.48 ▼0.67
Add New Post /wp-admin/post-new.php1,537 ▲2323.43 ▲5.98665.92 ▼36.1955.48 ▼6.19
Media Library /wp-admin/upload.php1,389 ▲14.25 ▼0.01101.31 ▼10.2346.15 ▼0.10
Mobile App API /wp-admin/options-general.php?page=mobile-app-api9912.1623.1631.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mobile-app-api/controllers/class-shoutem-controller-view.php+41
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 41 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mobile-app-api
    • > Deprecated in wp-content/plugins/mobile-app-api/library/JSON.php+781
    Array and string offset access syntax with curly braces is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemDao' not found in wp-content/plugins/mobile-app-api/model/class-shoutem-flagallery-dao.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemController' not found in wp-content/plugins/mobile-app-api/controllers/class-shoutem-posts-comments-controller.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemDao' not found in wp-content/plugins/mobile-app-api/model/class-shoutem-posts-dao.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemDao' not found in wp-content/plugins/mobile-app-api/model/class-shoutem-ngg-dao.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemController' not found in wp-content/plugins/mobile-app-api/controllers/class-shoutem-users-controller.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemDao' not found in wp-content/plugins/mobile-app-api/model/class-shoutem-events-manager-dao.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemController' not found in wp-content/plugins/mobile-app-api/controllers/class-shoutem-photos-controller.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemDao' not found in wp-content/plugins/mobile-app-api/model/class-shoutem-protectediframe-dao.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemController' not found in wp-content/plugins/mobile-app-api/controllers/class-shoutem-podcasts-controller.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ShoutemController' not found in wp-content/plugins/mobile-app-api/controllers/class-shoutem-service-controller.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === mobile-app-api === )
You can look at the official readme.txt

mobile-app-api/shoutem-api.php 92% from 13 tests

This is the main PHP file of "Mobile App API" version 1.0.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mobile-app-api.php" instead of "shoutem-api.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected4,306 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,1021,1324,306

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.17
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes00.00%
Methods246
▷ Static methods166.50%
▷ Public methods19579.27%
▷ Protected methods124.88%
▷ Private methods3915.85%
Functions44
▷ Named functions3784.09%
▷ Anonymous functions715.91%
Constants9
▷ Global constants9100.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
There are no PNG files in this plugin