84% super-progressive-web-apps

Code Review | Super Progressive Web Apps

WordPress plugin Super Progressive Web Apps scored84%from 54 tests.

About plugin

  • Plugin page: super-progressive...
  • Plugin version: 2.2.22
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 24, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 113
  • Update frequency: every 18.9 days
  • Top authors: superpwa (68.14%)arunbasillal (30.09%)josevarghese (3.54%)

Code review

54 tests

User reviews

211 reviews

Install metrics

50,000+ active /1,543,078 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.68MB] [CPU: ▲2.27ms] Passed 4 tests

Analyzing server-side resources used by Super Progressive Web Apps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7040.12 ▼0.91
Dashboard /wp-admin4.03 ▲0.7258.69 ▲6.35
Posts /wp-admin/edit.php4.08 ▲0.7154.75 ▲6.87
Add New Post /wp-admin/post-new.php6.56 ▲0.67100.84 ▼3.23
Media Library /wp-admin/upload.php3.89 ▲0.6545.93 ▲14.21
Settings /wp-admin/admin.php?page=superpwa3.9847.62
Add-ons /wp-admin/admin.php?page=superpwa-addons3.8851.20
Upgrade to Pro /wp-admin/admin.php?page=superpwa-upgrade3.8842.00

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

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification found: 2 files (5.80KB) outside of "wp-content/plugins/super-progressive-web-apps/" and "wp-content/uploads/"
    • (new file) superpwa-manifest.json
    • (new file) superpwa-sw.js
Filesystem: 79 new files
Database: no new tables, 9 new options
New WordPress options
superpwa_version
superpwa_settings
widget_theysaidso_widget
widget_recent-comments
db_upgraded
superpwa_hide_newsletter
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Super Progressive Web Apps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17614.22 ▼0.051.81 ▲0.0429.59 ▼14.77
Dashboard /wp-admin2,315 ▲1345.72 ▲0.0492.58 ▼21.9693.39 ▲46.84
Posts /wp-admin/edit.php2,221 ▲1212.01 ▲0.0339.37 ▲0.9836.43 ▼0.56
Add New Post /wp-admin/post-new.php1,641 ▲10523.17 ▼0.04727.95 ▲104.3351.73 ▼1.55
Media Library /wp-admin/upload.php1,515 ▲1184.34 ▲0.1799.32 ▼0.5872.22 ▲26.10
Settings /wp-admin/admin.php?page=superpwa2,3944.4489.34110.30
Add-ons /wp-admin/admin.php?page=superpwa-addons1,6563.3752.5884.17
Upgrade to Pro /wp-admin/admin.php?page=superpwa-upgrade1,7153.3947.37140.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • superpwa_hide_newsletter
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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)
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 take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(SUPERPWA_PATH_ABSfunctions/wp_dropdown_posts.php): failed to open stream: No such file or directory in wp-content/plugins/super-progressive-web-apps/admin/admin-ui-render-settings.php on line 28
    • > PHP Warning
      Use of undefined constant SUPERPWA_PATH_ABS - assumed 'SUPERPWA_PATH_ABS' (this will throw an Error in a future version of PHP) in wp-content/plugins/super-progressive-web-apps/admin/admin-ui-render-settings.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'SUPERPWA_PATH_ABSfunctions/wp_dropdown_posts.php' (include_path='.:/usr/share/php') in wp-content/plugins/super-progressive-web-apps/admin/admin-ui-render-settings.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/super-progressive-web-apps/admin/deactivate-feedback.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/super-progressive-web-apps/3rd-party/yandex.php:12

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: chrome app, web manifest, add to homescreen, manifest, progressive web apps...

super-progressive-web-apps/superpwa.php 92% from 13 tests

The main PHP file in "Super Progressive Web Apps" ver. 2.2.22 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("super-progressive-web-apps.php" instead of "superpwa.php")

Code Analysis Passed 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 plugin6,060 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,1962,2604,270
JavaScript8105101865
CSS3845565
PO File18389308
JSON10027
XML21025

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.50
▷ Minimum class complexity6.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions188
▷ Named functions18799.47%
▷ Anonymous functions10.53%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/qr-code.png9.45KB6.54KB▼ 30.84%
admin/img/superpwa-menu-icon.png1.08KB1.07KB▼ 0.63%
admin/img/superpwa-128x128.png11.91KB4.98KB▼ 58.14%
admin/img/app-shortcut.png2.98KB3.07KB0.00%
admin/img/email.png6.82KB3.88KB▼ 43.05%