67% pwa-by-intelvue

Code Review | PWA By Intelvue

WordPress plugin PWA By Intelvue scored 67% from 54 tests.

About plugin

  • Plugin page: pwa-by-intelvue
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: Sep 26, 2018
  • Number of updates: 16
  • Update frequency: every 0.9 days
  • Top authors: Ali Kazim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,001 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.18MB] [CPU: ▼45.06ms] Passed 4 tests

A check of server-side resources used by PWA By Intelvue
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6615.62 ▼34.30
Dashboard /wp-admin2.83 ▼0.4718.48 ▼31.62
Posts /wp-admin/edit.php2.83 ▼0.5219.31 ▼34.74
Add New Post /wp-admin/post-new.php2.83 ▼3.0521.74 ▼79.56
Media Library /wp-admin/upload.php2.83 ▼0.3922.27 ▼9.00

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

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • The plugin illegally modified 1 file (0.16KB) outside of "wp-content/plugins/pwa-by-intelvue/" and "wp-content/uploads/"
    • (new file) manifest.json
Filesystem: 18 new files
Database: no new tables, 12 new options
New WordPress options
theysaidso_admin_options
pwa_short_name
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
pwa_scope
pwa_name
can_compress_scripts
pwa_orientation
...

Browser metrics Passed 4 tests

A check of browser resources used by PWA By Intelvue
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲6913.37 ▲0.081.76 ▲0.0346.39 ▲2.52
Dashboard /wp-admin2,243 ▲375.13 ▼0.73117.44 ▲9.3484.48 ▲40.96
Posts /wp-admin/edit.php2,145 ▲532.35 ▲0.3341.98 ▲0.2740.93 ▲4.13
Add New Post /wp-admin/post-new.php1,567 ▲5324.34 ▲6.71627.00 ▲3.5230.02 ▼28.64
Media Library /wp-admin/upload.php1,444 ▲564.32 ▲0.1195.69 ▼11.2792.60 ▲50.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/pwa-by-intelvue/inc/class.pwa_admin.php+21
    Undefined variable: e
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_theysaidso_widget
    • pwa_short_name
    • pwa_display
    • theysaidso_admin_options
    • pwa_orientation
    • pwa_name
    • pwa_start_url
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pwa-by-intelvue/inc/view/admin/setting-tabs/cache.php
    • > /wp-content/plugins/pwa-by-intelvue/inc/view/admin/setting-tabs/push-notifications.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pwa-by-intelvue/inc/class.pwa_admin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pwa-by-intelvue/inc/class.pwa_frontend.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pwa-by-intelvue/inc/class.pwa_admin.php:11
    • > PHP Notice
      Undefined variable: push_notificaion_image in wp-content/plugins/pwa-by-intelvue/inc/view/admin/setting-tabs/push-notifications.php on line 2
    • > PHP Notice
      Undefined variable: cache_image in wp-content/plugins/pwa-by-intelvue/inc/view/admin/setting-tabs/cache.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/pwa-by-intelvue/inc/view/admin/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/pwa-by-intelvue/inc/view/admin/setting-tabs/general.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === pwa-by-intelvue === )
Please take inspiration from this readme.txt

pwa-by-intelvue/pwa.bootstrap.php 85% from 13 tests

The main PHP script in "PWA By Intelvue" version 0.1.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pwa-by-intelvue.php" instead of "pwa.bootstrap.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected700 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112727472
CSS1262124
JavaScript1296104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.60
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1350.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/intelvue-icon.png21.22KB1.28KB▼ 93.99%