10% wpapper

Code Review | WpApper - Create native mobile apps(Android and iOS)

WordPress plugin WpApper - Create native mobile apps(Android and iOS) scored10%from 54 tests.

About plugin

  • Plugin page: wpapper
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Jul 23, 2017
  • Number of updates: 40
  • Update frequency: every 0.8 days
  • Top authors: oldcwj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /963 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wpapper/lib/common/wpapperjson.class.php+46
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.82MB] [CPU: ▼47.36ms] Passed 4 tests

This is a short check of server-side resources used by WpApper - Create native mobile apps(Android and iOS)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.11 ▼0.3511.82 ▼28.14
Dashboard /wp-admin3.21 ▼0.1013.78 ▼35.60
Posts /wp-admin/edit.php3.21 ▼0.1514.12 ▼33.84
Add New Post /wp-admin/post-new.php3.21 ▼2.6814.31 ▼91.84
Media Library /wp-admin/upload.php3.21 ▼0.0215.56 ▼15.77
WpApper /wp-admin/admin.php?page=wpapper_admin3.2115.38
Send Push Msg /wp-admin/admin.php?page=display_wpapper_admin_send_notification_page3.2115.52
App Theme Settings /wp-admin/admin.php?page=display_wpapper_admin_style_page3.2114.29
Notification Settings /wp-admin/admin.php?page=display_wpapper_admin_fcm_settings_page3.2113.37

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 93 new files
Database: 1 new table, 6 new options
New tables
wp_fcm_users
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

WpApper - Create native mobile apps(Android and iOS): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.29 ▼1.091.70 ▼0.0337.67 ▲0.56
Dashboard /wp-admin2,265 ▲745.08 ▲0.1698.57 ▼5.9683.02 ▲40.61
Posts /wp-admin/edit.php2,152 ▲632.26 ▲0.2636.77 ▼9.2835.60 ▼0.01
Add New Post /wp-admin/post-new.php1,717 ▲17322.43 ▲4.38641.21 ▲7.9140.85 ▼20.26
Media Library /wp-admin/upload.php1,435 ▲474.26 ▲0.05104.34 ▲7.9784.84 ▲41.36
WpApper /wp-admin/admin.php?page=wpapper_admin1,0152.0324.9228.71
Send Push Msg /wp-admin/admin.php?page=display_wpapper_admin_send_notification_page8751.8525.9624.70
App Theme Settings /wp-admin/admin.php?page=display_wpapper_admin_style_page9811.8827.9529.89
Notification Settings /wp-admin/admin.php?page=display_wpapper_admin_fcm_settings_page8991.8524.4022.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wpapper/lib/common/wpapperjson.class.php+46
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_fcm_users
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 136 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_fcm_settings_page
    • > Deprecated in wp-content/plugins/wpapper/lib/common/wpapperjson.class.php+368
    Array and string offset access syntax with curly braces is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_fcm_settings_page
    • > Deprecated in wp-content/plugins/wpapper/lib/common/template.inc.php+65
    Methods with the same name as their class will not be constructors in a future version of PHP; Template has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_fcm_settings_page
    • > Notice in wp-content/plugins/wpapper/fcm/options.php+54
    Trying to access array offset on value of type bool
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_style_page
    • > Notice in wp-content/plugins/wpapper/admin/admin_model.class.php+122
    Trying to access array offset on value of type null
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_style_page
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_style_page
    • > Deprecated in wp-content/plugins/wpapper/lib/common/template.inc.php+531
    The each() function is deprecated. This message will be suppressed on further calls
    • > GET request to /wp-admin/admin.php?page=display_wpapper_admin_fcm_settings_page
    • > 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/admin.php?page=display_wpapper_admin_fcm_settings_page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpapper/lib/captcha/example-form.php
    • > /wp-content/plugins/wpapper/lib/captcha/resources/tools/dictionary-import/importwords.php
  • 23× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpapper/lib/json/class-wp-json-server.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_JSON_Meta' not found in wp-content/plugins/wpapper/lib/json/class-wp-json-meta-posts.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/wpapper/lib/json/class-wp-json-server.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpapper/lib/captcha/resources/tools/dictionary-import/importwords.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_JSON_Posts' not found in wp-content/plugins/wpapper/lib/json/class-wp-json-media.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wpapper/api/WPAPPER_API_VERSION/admin_api.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpapper/admin/wpapper-admin.class.php on line 12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/wpapper/lib/json/class-wp-json-server.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpapper_lan() in wp-content/plugins/wpapper/wpapper.php:36
    • > PHP Notice
      Undefined variable: argc in wp-content/plugins/wpapper/lib/captcha/resources/tools/dictionary-import/importwords.php on line 22
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpapper/lib/json/class-wp-json-server.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

wpapper/wpapper.php Passed 13 tests

The main PHP file in "WpApper - Create native mobile apps(Android and iOS)" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
66 characters long description:
Create native app(Android & iOS). The wordpress plugin for Wpapper

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected12,955 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP411,43896,8117,076
CSS32,929133,111
JavaScript101201291,223
Markdown237601,185
HTML33119277
PO File1374083

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.97
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes28
▷ Abstract classes27.14%
▷ Concrete classes2692.86%
▷ Final classes00.00%
Methods360
▷ Static methods7119.72%
▷ Public methods29983.06%
▷ Protected methods6116.94%
▷ Private methods00.00%
Functions78
▷ Named functions78100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants1850.00%
▷ Class constants1850.00%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 compressed PNG files occupy 0.90MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/preview.png23.89KB25.47KB0.00%
admin/img/icon-android.png0.40KB0.41KB0.00%
admin/img/list.png143.56KB40.88KB▼ 71.52%
admin/img/logo.png2.27KB2.30KB0.00%
admin/img/phone.png9.99KB10.25KB0.00%