84% wp-appkit

Code Review | WP-AppKit - Mobile apps and PWA for WordPress

WordPress plugin WP-AppKit - Mobile apps and PWA for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: wp-appkit
  • Plugin version: 1.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Oct 27, 2020
  • Number of updates: 33
  • Update frequency: every 39.6 days
  • Top authors: Uncategorized Creations (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /34,505 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲1.76MB] [CPU: ▲11.75ms] Passed 4 tests

A check of server-side resources used by WP-AppKit - Mobile apps and PWA for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.20 ▲1.7356.39 ▲9.46
Dashboard /wp-admin5.14 ▲1.7991.56 ▲28.87
Posts /wp-admin/edit.php5.17 ▲1.8259.41 ▲12.64
Add New Post /wp-admin/post-new.php7.65 ▲1.76103.94 ▲10.09
Media Library /wp-admin/upload.php4.98 ▲1.7551.35 ▲14.80
Themes /wp-admin/admin.php?page=wpak_bo_themes5.0044.15
Upload Themes /wp-admin/admin.php?page=wpak_bo_upload_themes4.9541.71
Applications /wp-admin/edit.php?post_type=wpak_apps5.0244.92
Settings /wp-admin/admin.php?page=wpak_bo_settings_page4.9541.62

Server storage [IO: ▲3.87MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 56 files (1,253.09KB) outside of "wp-content/plugins/wp-appkit/" and "wp-content/uploads/"
    • (new file) wp-content/themes-wp-appkit/q-android/archive-favorites.html
    • (new file) wp-content/themes-wp-appkit/q-android/css/post-list.css
    • (new file) wp-content/themes-wp-appkit/q-android/archive.html
    • (new file) wp-content/themes-wp-appkit/q-android/fonts/PT-Serif-Regular.ttf
    • (new file) wp-content/themes-wp-appkit/q-android/css/post-detail.css
    • (new file) wp-content/themes-wp-appkit/q-android/icons/pwa-icon-192x192.png
    • (new file) wp-content/themes-wp-appkit/q-android/head.html
    • (new file) wp-content/themes-wp-appkit/q-android/icons/pwa-icon-48x48.png
    • (new file) wp-content/themes-wp-appkit/q-android/css/common.css
    • (new file) wp-content/themes-wp-appkit/q-android/icons/pwa-icon-144x144.png
    • ...
Filesystem: 262 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
wpak_version
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP-AppKit - Mobile apps and PWA for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲11013.43 ▼0.951.71 ▼0.4041.49 ▼0.92
Dashboard /wp-admin2,284 ▲935.90 ▲1.01108.70 ▼6.9242.74 ▼0.91
Posts /wp-admin/edit.php2,168 ▲792.03 ▼0.0141.01 ▲3.6735.83 ▲0.39
Add New Post /wp-admin/post-new.php1,565 ▲4623.28 ▲0.14660.72 ▲10.4456.72 ▼3.28
Media Library /wp-admin/upload.php1,467 ▲794.26 ▲0.0199.46 ▼0.3740.82 ▼1.29
Themes /wp-admin/admin.php?page=wpak_bo_themes1,0542.1543.3233.67
Upload Themes /wp-admin/admin.php?page=wpak_bo_upload_themes8821.7325.5130.06
Applications /wp-admin/edit.php?post_type=wpak_apps1,1421.9632.3830.96
Settings /wp-admin/admin.php?page=wpak_bo_settings_page1,0702.0622.7727.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • wpak_version
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 39× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-appkit/lib/user-permissions/authentication-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-appkit/lib/themes/themes-bo-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WpakThemes' not found in wp-content/plugins/wp-appkit/lib/themes/themes-page-template.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-appkit/lib/navigation/navigation-bo-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-appkit/lib/web-services/core-web-services/synchronization.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-appkit/lib/web-services/core-web-services/comments.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-appkit/default-themes/q-ios/php/add-custom-data.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-appkit/lib/components/components-bo-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-appkit/lib/web-services/core-web-services/live-query.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/wp-appkit/wp-cli-commands/wpak-commands.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: pwa, progressive web app, ios, android, phonegap build...

wp-appkit/wp-appkit.php Passed 13 tests

"WP-AppKit - Mobile apps and PWA for WordPress" version 1.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
58 characters long description:
Build mobile apps and PWA based on your WordPress content.

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
Success! There were no dangerous files found in this plugin26,016 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript662,8753,79511,503
PHP622,7863,0509,183
CSS103682302,501
SVG14771,662
PO File1283592729
HTML1716784328
Markdown2290110

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity33.10
▷ Minimum class complexity1.00
▷ Maximum class complexity308.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods529
▷ Static methods39173.91%
▷ Public methods37170.13%
▷ Protected methods10219.28%
▷ Private methods5610.59%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants30
▷ Global constants13.33%
▷ Class constants2996.67%
▷ Public constants29100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
69 PNG files occupy 0.43MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons-splashscreens/ios/icons/icon-small.png1.34KB0.44KB▼ 67.18%
images/icons-splashscreens/ios/splashscreens/Default-736h-Lanscape@3x~iphone.png13.88KB11.12KB▼ 19.89%
images/icons-splashscreens/android/icon.png2.85KB1.46KB▼ 48.89%
images/icons-splashscreens/android-cordova/res/android/icons/icon-wp-appkit-xxhdpi.png2.85KB1.46KB▼ 48.89%
images/icons-splashscreens/android-cordova/res/android/splashscreens/splashscreen-wp-appkit-xxxhdpi.9.png21.54KB11.40KB▼ 47.08%