79% pwamp

Code Review | PWA+AMP

WordPress plugin PWA+AMP scored79%from 54 tests.

About plugin

  • Plugin page: pwamp
  • Plugin version: 5.10.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Feb 18, 2018
  • Latest release: Jan 15, 2021
  • Number of updates: 103
  • Update frequency: every 10.3 days
  • Top authors: rickey29 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,898 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼1.77MB] [CPU: ▼49.62ms] Passed 4 tests

Analyzing server-side resources used by PWA+AMP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.245.40 ▼29.87
Dashboard /wp-admin2.24 ▼1.065.64 ▼40.05
Posts /wp-admin/edit.php2.24 ▼1.126.07 ▼40.17
Add New Post /wp-admin/post-new.php2.24 ▼3.657.11 ▼88.39
Media Library /wp-admin/upload.php2.24 ▼0.995.81 ▼28.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for PWA+AMP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.211.76 ▲0.0440.33 ▼1.26
Dashboard /wp-admin2,203 ▲155.82 ▲0.0196.93 ▼3.1941.38 ▼0.32
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0134.05 ▼7.7533.80 ▼3.92
Add New Post /wp-admin/post-new.php1,535 ▼1123.16 ▲5.01675.73 ▲54.8454.76 ▲11.09
Media Library /wp-admin/upload.php1,388 ▲34.40 ▲0.2093.41 ▼7.5840.15 ▼5.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (https://download.flexplat.com/apparel.png), #2 (https://download.flexplat.com/boat-rental.png), #3 (https://download.flexplat.com/book-shop.png), #4 (https://download.flexplat.com/digital-store.png), #5 (https://download.flexplat.com/electronics-shop.png), #6 (https://download.flexplat.com/jewellery-shop-2.png), #7 (https://download.flexplat.com/perfume-shop.png), #8 (https://download.flexplat.com/pet-shop.png), #9 (https://download.flexplat.com/shop.png)
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can look at the official readme.txt

pwamp/pwamp.php 92% from 13 tests

The primary PHP file in "PWA+AMP" version 5.10.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,448 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54011401,447
JavaScript13121

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.43
Average class complexity72.67
▷ Minimum class complexity5.00
▷ Maximum class complexity129.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods61
▷ Static methods00.00%
▷ Public methods2642.62%
▷ Protected methods00.00%
▷ Private methods3557.38%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pwamp/manifest/mf-logo-512.png14.45KB8.37KB▼ 42.04%
pwamp/manifest/mf-logo-192.png3.38KB2.71KB▼ 19.82%