65% wpnativeapps

Code Review | Website2App

WordPress plugin Website2App scored 65% from 54 tests.

About plugin

  • Plugin page: wpnativeapps
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Aug 8, 2023
  • Number of updates: 52
  • Update frequency: every 5.4 days
  • Top authors: wpnativeapps (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 928 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▲2.43ms] 75% from 4 tests

A check of server-side resources used by Website2App
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 868.83ms on /wp-admin/admin.php?page=website2app-publish)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.96 ▲7.74
Dashboard /wp-admin3.38 ▲0.0855.02 ▲9.17
Posts /wp-admin/edit.php3.50 ▲0.1450.05 ▲3.78
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.30 ▼9.11
Media Library /wp-admin/upload.php3.28 ▲0.0537.45 ▲7.32
Introduction /wp-admin/admin.php?page=website2app3.3038.01
Publish /wp-admin/admin.php?page=website2app-publish3.32868.83
Settings /wp-admin/admin.php?page=website2app-settings3.5645.23

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

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • You have illegally modified 1 file (1.41KB) outside of "wp-content/plugins/wpnativeapps/" and "wp-content/uploads/"
    • (new file) wp-content/WPNA/config.json
Filesystem: 114 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Website2App
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,121 ▲38615.72 ▲1.376.33 ▲4.3941.54 ▲1.54
Dashboard /wp-admin2,432 ▲2447.11 ▲2.22135.54 ▲27.0150.13 ▲13.07
Posts /wp-admin/edit.php2,344 ▲2553.55 ▲1.5455.62 ▲19.6174.62 ▲42.10
Add New Post /wp-admin/post-new.php1,603 ▲7023.76 ▲0.58659.33 ▼17.58138.05 ▲88.09
Media Library /wp-admin/upload.php1,486 ▲984.76 ▲0.6090.30 ▼8.4986.00 ▲43.11
Introduction /wp-admin/admin.php?page=website2app1,70714.28321.1682.99
Publish /wp-admin/admin.php?page=website2app-publish1,0823.6244.8576.61
Settings /wp-admin/admin.php?page=website2app-settings4,20112.48424.24184.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=website2app-publish
    • > Notice in wp-content/plugins/wpnativeapps/admin/partials/publish.php+23
    Undefined index: status

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpnativeapps/admin/partials/website2app-admin-display.php
    • > /wp-content/plugins/wpnativeapps/admin/partials/account.php
    • > /wp-content/plugins/wpnativeapps/admin/partials/topnav.php
    • > /wp-content/plugins/wpnativeapps/public/partials/website2app-public-display.php
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wpnativeapps/admin/partials/store-listing.php:3
    • > PHP Notice
      Undefined variable: config in wp-content/plugins/wpnativeapps/admin/partials/topnav.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wpnativeapps/admin/partials/push-notifications.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wpnativeapps/admin/partials/analytics.php:4
    • > PHP Notice
      Undefined variable: defaultLogoURL in wp-content/plugins/wpnativeapps/admin/partials/authentication.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_menu_page() in wp-content/plugins/wpnativeapps/admin/setup/w2a-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wpnativeapps/admin/partials/publish.php:3
    • > PHP Notice
      Undefined variable: config in wp-content/plugins/wpnativeapps/admin/partials/bottomnav.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpnativeapps/admin/partials/bottomnav.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wpnativeapps/admin/partials/website2app-introduction.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=website2app-settings
    • > Other (warning) in unknown
    https://www.youtube.com/s/player/f7e1823a/www-widgetapi.vflset/www-widgetapi.js 1223 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: app, android, mobile, native, react...

wpnativeapps/website2app.php 85% from 13 tests

The primary PHP file in "Website2App" version 1.0.9 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • 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: It is recommended to name the main PHP file as the plugin slug ("wpnativeapps.php" instead of "website2app.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin8,934 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP254317623,617
CSS193972273,227
JavaScript92874301,848
HTML104062242

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.88
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods50
▷ Static methods24.00%
▷ Public methods4590.00%
▷ Protected methods00.00%
▷ Private methods510.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 0.56MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/general/qrcode.png5.30KB2.74KB▼ 48.44%
admin/images/publish/task-bro.png59.10KB22.42KB▼ 62.06%
admin/icons/arrows/down.png7.11KB3.87KB▼ 45.56%
admin/icons/arrows/right.png6.73KB3.88KB▼ 42.28%
admin/icons/arrows/left.png6.69KB3.78KB▼ 43.51%