68% wpmobile-apps

Code Review | WPMobile Apps

WordPress plugin WPMobile Apps scored 68% from 54 tests.

About plugin

  • Plugin page: wpmobile-apps
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2.2
  • WordPress version: 5.8.1
  • First release: Aug 19, 2014
  • Latest release: Jul 2, 2015
  • Number of updates: 23
  • Update frequency: every 13.8 days
  • Top authors: MarceloMuriel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 4,162 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼139.75ms] Passed 4 tests

A check of server-side resources used by WPMobile Apps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.98 ▲12.24
Dashboard /wp-admin3.06 ▲0.0048.45 ▲4.56
Posts /wp-admin/edit.php3.11 ▲0.0049.50 ▲4.04
Add New Post /wp-admin/post-new.php5.42 ▼0.0290.28 ▼569.08
Media Library /wp-admin/upload.php3.00 ▲0.0034.35 ▲1.50

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 258 new files
Database: no new tables, 1 new option
New WordPress options
wpmob_cookie_name

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPMobile Apps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.76 ▲0.207.68 ▼0.3749.21 ▼1.89
Dashboard /wp-admin2,973 ▲395.88 ▼0.04143.26 ▼0.09115.45 ▼6.91
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.1265.42 ▼2.0088.27 ▼11.33
Add New Post /wp-admin/post-new.php1,676 ▼718.87 ▲0.17367.08 ▼27.71109.05 ▼7.49
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.02153.02 ▼13.52119.82 ▼1.23

Uninstaller [IO: ▲2.06MB] [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
  • Incomplete uninstall procedure, leaving 258 files (2.06MB) in the plugin directory
    • (new file) apps/contact-us/app.js
    • (new file) apps/call-us/langs/wpmob-call-us-fr_FR.po
    • (new file) apps/call-us/app.js
    • (new file) README.md
    • (new file) LICENSE
    • (new file) apps/call-us/app.php
    • (new file) apps/call-us/view.php
    • (new file) apps/call-us/app.css
    • (new file) apps/contact-us/app.css
    • (new file) apps/call-us/langs/wpmob-call-us-fr_FR.mo
    • ...
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • wpmob_cookie_name

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wpmobile-apps/themes/mobilissimo/css/style.php
  • 52× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'WPMOB_DIR/core/theme/class-wpmob-theme.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpmobile-apps/core/theme/class-wpmob-mobilissimo.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wpmobile-apps/themes/mobilissimo/page-gallery3.php:3
    • > PHP Warning
      Use of undefined constant WPMOB_DIR - assumed 'WPMOB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpmobile-apps/core/theme/class-wpmob-mobilissimo.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpmobile-apps/themes/mobilissimo/functions/config.php:25
    • > PHP Warning
      Use of undefined constant WPMOB_DIR - assumed 'WPMOB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpmobile-apps/core/class-wpmob-app.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpmobile-apps/themes/mobilissimo/functions/config.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/wpmobile-apps/themes/mobilissimo/acera-options/includes/theme_info.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/wpmobile-apps/themes/mobilissimo/acera-options/includes/theme_info.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_pages() in wp-content/plugins/wpmobile-apps/themes/mobilissimo/acera-options/options/acera_options.php:4
    • > PHP Warning
      require_once(WPMOB_DIR/core/class-wpmob-app.php): failed to open stream: No such file or directory in wp-content/plugins/wpmobile-apps/core/class-wpmob.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: iphone, mobile, ipad, smartphone, mobile plugin...

wpmobile-apps/wpmob.php 85% from 13 tests

The principal PHP file in "WPMobile Apps" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpmobile-apps.php" instead of "wpmob.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected18,197 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,6191,8967,302
CSS206017674,720
JSON1002,876
JavaScript203975002,074
SVG200888
PO File6113140334
Markdown1103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity34.07
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.01
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods154
▷ Static methods1912.34%
▷ Public methods15399.35%
▷ Protected methods00.00%
▷ Private methods10.65%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
128 PNG files occupy 0.26MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/mobilissimo/acera-options/images/icons/recycle-filled.png1.45KB0.68KB▼ 52.80%
themes/mobilissimo/acera-options/assets/c_brown.png1.15KB0.09KB▼ 91.75%
themes/mobilissimo/acera-options/images/colorpicker_rgb_b.png0.95KB0.76KB▼ 19.48%
themes/mobilissimo/acera-options/images/buttonblue_bg.png0.16KB0.20KB0.00%
imgs/top_men_bg.png3.02KB1.03KB▼ 65.74%