68% wp-file-version

Code Review | WP File Version

WordPress plugin WP File Version scored68%from 54 tests.

About plugin

  • Plugin page: wp-file-version
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: Oct 7, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: shivrajib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,111 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.48ms] Passed 4 tests

Server-side resources used by WP File Version
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.08 ▼3.73
Dashboard /wp-admin3.56 ▲0.2646.37 ▼6.05
Posts /wp-admin/edit.php3.68 ▲0.3248.28 ▲0.72
Add New Post /wp-admin/post-new.php6.16 ▲0.2894.89 ▲6.31
Media Library /wp-admin/upload.php3.49 ▲0.2637.38 ▲3.13
Template /wp-admin/admin.php?page=wfv_settings_templates3.4939.05
Settings /wp-admin/admin.php?page=wfv_settings3.4942.63
WP Edit File /wp-admin/admin.php?page=wfv_edit_file3.5037.71
WP File Manage Versions /wp-admin/admin.php?page=wfv_manage_versions3.4833.50
Icons /wp-admin/admin.php?page=wfv_settings_icons3.4936.69
Add File /wp-admin/admin.php?page=wfv_manage_files3.5036.06

Server storage [IO: ▲1.58MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • The plugin illegally modified 1 file (0.03KB) outside of "wp-content/plugins/wp-file-version/" and "wp-content/uploads/"
    • (new file) wp-content/wfv_files/.htaccess
Filesystem: 62 new files
Database: 1 new table, 9 new options
New tables
wp_wfv_files
New WordPress options
widget_recent-comments
wfv_db_version
theysaidso_admin_options
wfv_setting_file_tpl
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
wfv_setting_file_css

Browser metrics Passed 4 tests

A check of browser resources used by WP File Version
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.26 ▼1.494.07 ▲2.2539.67 ▼3.38
Dashboard /wp-admin2,251 ▲634.95 ▲0.07100.16 ▼15.3069.72 ▲21.86
Posts /wp-admin/edit.php2,141 ▲552.09 ▲0.0838.16 ▲3.1434.76 ▼2.36
Add New Post /wp-admin/post-new.php1,563 ▲2718.21 ▼4.87798.00 ▲117.0370.40 ▲19.07
Media Library /wp-admin/upload.php1,430 ▲394.25 ▲0.08114.14 ▲19.0143.62 ▲0.23
Template /wp-admin/admin.php?page=wfv_settings_templates1,1463.9048.9791.30
Settings /wp-admin/admin.php?page=wfv_settings1,1073.8144.3758.87
WP Edit File /wp-admin/admin.php?page=wfv_edit_file1,0113.7544.3562.16
WP File Manage Versions /wp-admin/admin.php?page=wfv_manage_versions7312.1019.3319.78
Icons /wp-admin/admin.php?page=wfv_settings_icons1,3094.9771.5277.09
Add File /wp-admin/admin.php?page=wfv_manage_files1,5405.4076.9075.29

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
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wfv_files
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • wfv_db_version
    • wfv_setting_file_css
    • theysaidso_admin_options
    • can_compress_scripts
    • wfv_setting_file_tpl
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wfv_manage_versions
    • > Notice in wp-content/plugins/wp-file-version/views/templates/manageVersion.php+7
    Undefined index: _wpnonce

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-file-version/views/templates/fileDetailModel.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: download, version, file, documents

wp-file-version/wfv.php 85% from 13 tests

"WP File Version" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-file-version.php" instead of "wfv.php")
  • Description: The description should be shorter than 140 characters (currently 423 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,968 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP172383211,664
SVG200973
JavaScript75167702
CSS78349629

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity56.25
▷ Minimum class complexity7.00
▷ Maximum class complexity158.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods66
▷ Static methods46.06%
▷ Public methods6598.48%
▷ Protected methods00.00%
▷ Private methods11.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
16 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/wfv_new_version.png2.06KB1.82KB▼ 11.30%
public/images/sort_desc_disabled.png1.02KB0.25KB▼ 75.98%
public/images/forward_enabled_hover.png1.35KB0.58KB▼ 56.93%
public/images/back_enabled_hover.png1.34KB0.60KB▼ 55.56%
public/images/wfv_edit.png1.97KB1.68KB▼ 14.36%