83% avify

Code Review | Avify

WordPress plugin Avify scored83%from 54 tests.

About plugin

  • Plugin page: avify
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: May 3, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 28
  • Update frequency: every 19.4 days
  • Top authors: avify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,340 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.69ms] Passed 4 tests

This is a short check of server-side resources used by Avify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.96 ▼0.08
Dashboard /wp-admin3.37 ▲0.0642.92 ▼1.07
Posts /wp-admin/edit.php3.42 ▲0.0643.61 ▲0.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.81 ▼14.42
Media Library /wp-admin/upload.php3.29 ▲0.0637.23 ▲4.46

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Avify
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.36 ▼0.231.65 ▼0.1044.73 ▲0.59
Dashboard /wp-admin2,239 ▲725.61 ▼0.0384.83 ▼33.3037.25 ▼3.80
Posts /wp-admin/edit.php2,148 ▲482.00 ▼0.0236.08 ▼1.9034.60 ▼1.65
Add New Post /wp-admin/post-new.php1,549 ▲2123.03 ▼0.08676.09 ▲44.6156.44 ▲7.80
Media Library /wp-admin/upload.php1,445 ▲424.23 ▼0.0099.78 ▲0.7942.66 ▼0.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% 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 items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/avify/templates/checkout.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/avify/avify-payments-gateway.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avify/avify-custom-options.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/avify/avify-shipping.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/avify/includes/checkout.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avify/avify-checkout.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: checkout, avify, woocommerce, orders, payment gateway

avify/avify-wordpress-initializer.php 77% from 13 tests

The entry point to "Avify" version 1.2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("avify.php" instead of "avify-wordpress-initializer.php")
  • Git Repository: An alternative Git repository was detected

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,231 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP213685182,532
PO File315096406
Markdown2870181
JSON30090
YAML12020
CSS1211
JavaScript1011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.90
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods68
▷ Static methods2942.65%
▷ Public methods6189.71%
▷ Protected methods00.00%
▷ Private methods710.29%
Functions31
▷ Named functions2477.42%
▷ Anonymous functions722.58%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-1544x500.png53.26KB22.08KB▼ 58.55%
.wordpress-org/banner-772x250.png25.80KB10.71KB▼ 58.49%
.wordpress-org/icon-128x128.png6.04KB3.06KB▼ 49.30%
.wordpress-org/icon-256x256.png16.16KB6.69KB▼ 58.61%