72% progressive-web-apps

Code Review | Progressive Web Apps

WordPress plugin Progressive Web Apps scored72%from 54 tests.

About plugin

  • Plugin page: progressive-web-apps
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2016
  • Latest release: Jan 31, 2020
  • Number of updates: 20
  • Update frequency: every 61.7 days
  • Top authors: anghelalexandra (55%)abarbulescu (45%)mikewire_rocksolid (10%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /14,303 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.65MB] [CPU: ▼14.43ms] 75% from 4 tests

Server-side resources used by Progressive Web Apps
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 685.03ms on /wp-admin/admin.php?page=pwapp-options)
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.70 ▼3.88
Dashboard /wp-admin3.34 ▲0.0344.03 ▼4.03
Posts /wp-admin/edit.php3.39 ▲0.0349.81 ▲5.35
Add New Post /wp-admin/post-new.php3.21 ▼2.6834.87 ▼55.17
Media Library /wp-admin/upload.php3.26 ▲0.0337.33 ▲5.75
App Themes /wp-admin/admin.php?page=pwapp-options3.32685.03
Look & Feel /wp-admin/admin.php?page=pwapp-options-theme-settings3.3431.33

Server storage [IO: ▲15.02MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 165 new files
Database: no new tables, 29 new options
New WordPress options
pwapp_font_subtitles
widget_theysaidso_widget
pwapp_categories_details
pwapp_inactive_categories
pwapp_theme_timestamp
can_compress_scripts
widget_recent-posts
pwapp_theme
pwapp_enable_facebook
pwapp_font_paragraphs
...

Browser metrics Passed 4 tests

A check of browser resources used by Progressive Web Apps
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.33 ▼0.981.85 ▼0.0438.93 ▼5.51
Dashboard /wp-admin2,236 ▲485.01 ▼0.86110.12 ▼11.2477.42 ▲33.24
Posts /wp-admin/edit.php2,134 ▲422.20 ▲0.2238.86 ▲2.9236.49 ▲2.69
Add New Post /wp-admin/post-new.php1,561 ▲4723.12 ▲5.48631.57 ▼52.4937.15 ▼12.48
Media Library /wp-admin/upload.php1,424 ▲364.30 ▼0.0197.76 ▼14.8975.78 ▲26.49
App Themes /wp-admin/admin.php?page=pwapp-options1,6401.9632.8372.82
Look & Feel /wp-admin/admin.php?page=pwapp-options-theme-settings3,2644.65127.9880.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/progressive-web-apps/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/progressive-web-apps/vendor/leafo/scssphp/src/Formatter/Debug.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/progressive-web-apps/admin/sections/feedback.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/progressive-web-apps/frontend/themes/app2/single.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/progressive-web-apps/frontend/sections/smart-app-banner.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/progressive-web-apps/vendor/leafo/scssphp/src/Formatter/Nested.php:22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/progressive-web-apps/core/config.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/progressive-web-apps/vendor/leafo/scssphp/src/Formatter/Crunched.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function single_cat_title() in wp-content/plugins/progressive-web-apps/frontend/themes/app2/category.php:3
    • > PHP Warning
      require_once(PWAPP_PLUGIN_PATHfrontend/sections/template.php): failed to open stream: No such file or directory in wp-content/plugins/progressive-web-apps/frontend/themes/app2/index.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_single() in wp-content/plugins/progressive-web-apps/frontend/sections/show-rel.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/phantom.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/extrude.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/palm.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/ghost.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/blend.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/future.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/lucid.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/base.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/popsicle.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/invision.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/mosaic.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/elevate.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/folio.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/pulse.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/pure.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pwapp-options
    • > Network (severe)
    https://d3oqwjghculspf.cloudfront.net/dashboard/more/themes/icons/vedi.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (The Mosaic progressive web app), #2 ("App Themes" page from the admin panel.), #3 ("App Themes" page from the admin panel with other Premium app themes), #4 ("Look & Feel" page from the admin panel. Customize theme by choosing colors and fonts.), #5 ("Look & Feel" page from the admin panel. Customize theme by adding your own app icon & logo.)
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt might help

progressive-web-apps/progressive-web-apps.php Passed 13 tests

The main file in "Progressive Web Apps" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
123 characters long description:
Progressive Web Apps use modern web capabilities to deliver app-like user experiences. They're reliable, fast and engaging.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin17,113 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
PHP673,0444,3249,554
JavaScript291,3371,6565,000
JSON1900967
Sass113210642
CSS147950590
Markdown71490340
XML10020

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity41.36
▷ Minimum class complexity1.00
▷ Maximum class complexity709.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes44
▷ Abstract classes24.55%
▷ Concrete classes4295.45%
▷ Final classes00.00%
Methods482
▷ Static methods316.43%
▷ Public methods20141.70%
▷ Protected methods26354.56%
▷ Private methods183.73%
Functions16
▷ Named functions318.75%
▷ Anonymous functions1381.25%
Constants84
▷ Global constants1315.48%
▷ Class constants7184.52%
▷ Public constants71100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/btn_close_msg.png3.09KB0.43KB▼ 86.13%
admin/images/ribbon-premium.png3.76KB0.91KB▼ 75.90%
pwa-logo.png24.21KB10.71KB▼ 55.77%
admin/images/appticles-logo.png0.50KB0.58KB0.00%