84% add-file-version-afv

Code Review | Add File Version (AFV)

WordPress plugin Add File Version (AFV) scored 84% from 54 tests.

About plugin

  • Plugin page: add-file-version-afv
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.5
  • WordPress version: 5.9.2
  • First release: Apr 27, 2018
  • Latest release: Oct 5, 2018
  • Number of updates: 22
  • Update frequency: every 7.3 days
  • Top authors: joemakev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 865 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼290.11ms] Passed 4 tests

Server-side resources used by Add File Version (AFV)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0251.82 ▼8.53
Dashboard /wp-admin3.43 ▲0.0332.56 ▼1.80
Posts /wp-admin/edit.php3.66 ▲0.0238.80 ▲0.27
Add New Post /wp-admin/post-new.php6.90 ▼0.0792.98 ▼1,150.38
Media Library /wp-admin/upload.php3.31 ▲0.0227.44 ▲3.01
Add File Version /wp-admin/tools.php?page=afv_admin_page3.2822.59

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Add File Version (AFV)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲5916.02 ▲0.005.96 ▼0.352.29 ▲0.26
Dashboard /wp-admin2,928 ▲676.26 ▼0.01128.90 ▼3.62159.00 ▲4.28
Posts /wp-admin/edit.php2,731 ▲403.30 ▲0.0663.25 ▼1.55139.22 ▼4.40
Add New Post /wp-admin/post-new.php1,726 ▲1520.78 ▼0.91448.67 ▲22.56155.05 ▼11.58
Media Library /wp-admin/upload.php1,738 ▲405.84 ▲0.30152.11 ▲20.38187.16 ▲2.86
Add File Version /wp-admin/tools.php?page=afv_admin_page1,2923.4070.32138.45

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 4 options
    • afv_ver_target_file
    • afv_auto_ver
    • afv_manual_ver
    • afv_manual_ver_input

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-file-version-afv/ajax-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-file-version-afv/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
Please take inspiration from this readme.txt

add-file-version-afv/index.php 92% from 13 tests

The entry point to "Add File Version (AFV)" version 1.0.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("add-file-version-afv.php" instead of "index.php")

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
No dangerous file extensions were detected735 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ 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
There are no PNG files in this plugin