84% attachment-url-version

Code Review | Attachment URL Version

WordPress plugin Attachment URL Version scored84%from 54 tests.

About plugin

  • Plugin page: attachment-url-ve...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2021
  • Latest release: Jan 8, 2023
  • Number of updates: 18
  • Update frequency: every 31.2 days
  • Top authors: ott (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Attachment URL Version
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0131.53 ▼4.18
Dashboard /wp-admin3.32 ▲0.0141.95 ▼3.98
Posts /wp-admin/edit.php3.37 ▲0.0143.65 ▼4.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0175.64 ▼16.16
Media Library /wp-admin/upload.php3.24 ▲0.0131.68 ▼1.25

Server storage [IO: ▲0.02MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Attachment URL Version: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.141.70 ▲0.1137.99 ▼4.40
Dashboard /wp-admin2,206 ▲214.84 ▼0.07111.41 ▲9.0842.78 ▼1.33
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0238.70 ▼3.5535.48 ▼0.71
Add New Post /wp-admin/post-new.php1,514 ▼1917.66 ▼5.55657.07 ▼33.5752.21 ▼8.87
Media Library /wp-admin/upload.php1,382 ▼64.24 ▼0.04104.47 ▲7.8142.83 ▼2.97

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× 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/attachment-url-version/attachment-url-version.php:59

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 Passed 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
2 plugin tags: attachment, cache

attachment-url-version/attachment-url-version.php Passed 13 tests

The main PHP file in "Attachment URL Version" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
52 characters long description:
Adds the version number of attachments to their URL.

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
Everything looks great! No dangerous files found in this plugin31 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP152631

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions3
▷ Named functions3100.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
There are no PNG files in this plugin