84% add-file-version-afv

Code Review | Add File Version (AFV)

WordPress plugin Add File Version (AFV) scored84%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: 6.3.1
  • 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

10+ active /1,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.30ms] Passed 4 tests

An overview of server-side resources used by Add File Version (AFV)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.75 ▲3.63
Dashboard /wp-admin3.32 ▲0.0145.28 ▼4.82
Posts /wp-admin/edit.php3.37 ▲0.0147.76 ▲4.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.92 ▼4.35
Media Library /wp-admin/upload.php3.24 ▲0.0136.04 ▲4.67
Add File Version /wp-admin/tools.php?page=afv_admin_page3.2131.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
afv_manual_ver_input
theysaidso_admin_options
afv_manual_ver
widget_recent-comments
afv_auto_ver
afv_ver_target_file
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is 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 /2,872 ▲13713.75 ▼0.872.10 ▲0.3943.36 ▼1.82
Dashboard /wp-admin2,253 ▲655.18 ▲0.27112.74 ▲1.6039.33 ▼1.97
Posts /wp-admin/edit.php2,136 ▲472.33 ▲0.2737.83 ▼0.6233.95 ▼6.59
Add New Post /wp-admin/post-new.php1,529 ▼523.33 ▼0.02667.30 ▲7.0260.38 ▲5.12
Media Library /wp-admin/upload.php1,429 ▲444.40 ▲0.21101.75 ▼0.7740.56 ▼3.09
Add File Version /wp-admin/tools.php?page=afv_admin_page1,0702.5346.2132.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • afv_ver_target_file
    • can_compress_scripts
    • afv_auto_ver
    • widget_recent-posts
    • theysaidso_admin_options
    • afv_manual_ver
    • afv_manual_ver_input
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-file-version-afv/index.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-file-version-afv/ajax-functions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (20 tag instead of maximum 10)
You can look at the official readme.txt

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

The main PHP file in "Add File Version (AFV)" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file 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 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin735 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS4380423
PHP47944185
JavaScript47219127

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin