83% progressive-wp

Code Review | Progressive WordPress (PWA)

WordPress plugin Progressive WordPress (PWA) scored83%from 54 tests.

About plugin

  • Plugin page: progressive-wp
  • Plugin version: 2.1.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.0
  • WordPress version: 6.3.1
  • First release: Jan 12, 2018
  • Latest release: Mar 23, 2021
  • Number of updates: 86
  • Update frequency: every 13.6 days
  • Top authors: nico_martin (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

2,000+ active /50,553 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.88MB] [CPU: ▲1.03ms] Passed 4 tests

This is a short check of server-side resources used by Progressive WordPress (PWA)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8546.29 ▲10.13
Dashboard /wp-admin4.20 ▲0.8555.40 ▼0.64
Posts /wp-admin/edit.php4.25 ▲0.9052.57 ▲2.29
Add New Post /wp-admin/post-new.php6.80 ▲0.9289.03 ▼7.66
Media Library /wp-admin/upload.php4.13 ▲0.9045.22 ▲12.37
Add to Homescreen /wp-admin/admin.php?page=pwp-manifest4.1040.67
About /wp-admin/admin.php?page=progressive-wordpress4.1037.64
Push Notifications /wp-admin/admin.php?page=pwp-push4.1038.05
Offline usage /wp-admin/admin.php?page=pwp-offlineusage4.1040.26

Server storage [IO: ▲1.44MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 145 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
pwp-settings
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
pwp_data

Browser metrics Passed 4 tests

Checking browser requirements for Progressive WordPress (PWA)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.40 ▼0.882.09 ▲0.4444.63 ▲2.88
Dashboard /wp-admin2,249 ▲585.14 ▲0.22104.37 ▲2.3092.07 ▲50.69
Posts /wp-admin/edit.php2,149 ▲572.37 ▲0.3936.96 ▼4.3134.64 ▼0.99
Add New Post /wp-admin/post-new.php1,719 ▲20022.45 ▼0.74766.94 ▲96.7530.87 ▼23.60
Media Library /wp-admin/upload.php1,437 ▲494.49 ▲0.3398.71 ▼0.5389.70 ▲42.29
Add to Homescreen /wp-admin/admin.php?page=pwp-manifest1,3952.3652.3239.41
About /wp-admin/admin.php?page=progressive-wordpress1,0582.1433.3247.06
Push Notifications /wp-admin/admin.php?page=pwp-push9602.1329.3830.07
Offline usage /wp-admin/admin.php?page=pwp-offlineusage1,4012.3648.3437.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • pwp-settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/progressive-wp/Classes/Libs/minify/src/Exceptions/FileImportException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/progressive-wp/Classes/Libs/minify/src/JS.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/progressive-wp/progressive-wordpress.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/progressive-wp/Classes/Libs/minify/src/Exceptions/IOException.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/progressive-wp/3rdparty-support/amp.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/progressive-wp/Classes/Libs/path-converter/src/Converter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/progressive-wp/Classes/Libs/minify/src/Exceptions/BasicException.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/progressive-wp/3rdparty-support/accelerated-moblie-pages.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/progressive-wp/Classes/Libs/minify/src/CSS.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/progressive-wp/Classes/Libs/path-converter/src/NoConverter.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

progressive-wp/progressive-wordpress.php 85% from 13 tests

The principal PHP file in "Progressive WordPress (PWA)" v. 2.1.13 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("progressive-wp.php" instead of "progressive-wordpress.php")
  • Git Repository: An alternative Git repository was detected

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected20,212 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
JSON3009,997
JavaScript411,2563,5754,488
PHP319481,2263,621
CSS6200381,394
PO File1145164408
Markdown1700243
SVG180044
YAML10017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity18.50
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes23
▷ Abstract classes313.04%
▷ Concrete classes2086.96%
▷ Final classes00.00%
Methods181
▷ Static methods31.66%
▷ Public methods14278.45%
▷ Protected methods3318.23%
▷ Private methods63.31%
Functions49
▷ Named functions2448.98%
▷ Anonymous functions2551.02%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/pwa-menu-icon.png1.58KB0.82KB▼ 48.43%