84% dynamic-asset-versioning

Code Review | Dynamic Asset Versioning

WordPress plugin Dynamic Asset Versioning scored84%from 54 tests.

About plugin

  • Plugin page: dynamic-asset-ver...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2016
  • Latest release: Dec 14, 2016
  • Number of updates: 3
  • Update frequency: every 27.0 days
  • Top authors: stevegrunwell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,748 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Dynamic Asset Versioning
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.44 ▼5.54
Dashboard /wp-admin3.32 ▲0.0253.53 ▼1.29
Posts /wp-admin/edit.php3.37 ▲0.0152.44 ▼1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.01103.19 ▲3.95
Media Library /wp-admin/upload.php3.24 ▲0.0139.74 ▲0.95

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dynamic Asset Versioning
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.72 ▲0.482.02 ▲0.3845.86 ▲2.88
Dashboard /wp-admin2,197 ▲235.59 ▼0.0889.18 ▼1.1038.85 ▼6.59
Posts /wp-admin/edit.php2,102 ▲52.02 ▲0.0138.60 ▲0.4834.87 ▲0.11
Add New Post /wp-admin/post-new.php1,530 ▲223.22 ▲0.30607.48 ▼104.8855.69 ▲0.68
Media Library /wp-admin/upload.php1,405 ▲54.16 ▼0.0199.45 ▼8.0846.60 ▼1.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Growella\\DynamicAssetVersioning\\add_filter() in wp-content/plugins/dynamic-asset-versioning/dynamic-asset-versioning.php:72

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: cache, versioning, assets

dynamic-asset-versioning/dynamic-asset-versioning.php Passed 13 tests

The main PHP file in "Dynamic Asset Versioning" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
96 characters long description:
Dynamically set asset version numbers based on file modification times, preventing stale caches.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected59 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1175047
Markdown110012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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
Namespaces1
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected