90% associate-attachment

Code Review | Associate Attachment

WordPress plugin Associate Attachment scored90%from 54 tests.

About plugin

  • Plugin page: associate-attachment
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Jul 25, 2023
  • Number of updates: 39
  • Update frequency: every 22.8 days
  • Top authors: ishitaka (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,849 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.44ms] Passed 4 tests

A check of server-side resources used by Associate Attachment
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0049.01 ▲6.26
Dashboard /wp-admin3.31 ▲0.0148.60 ▲3.03
Posts /wp-admin/edit.php3.36 ▲0.0151.44 ▼6.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.71 ▼5.07
Media Library /wp-admin/upload.php3.24 ▲0.0138.01 ▲2.51
Associate Image /wp-admin/tools.php?page=associate-attachment3.2035.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Associate Attachment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.25 ▼1.134.90 ▲3.2740.80 ▲0.51
Dashboard /wp-admin2,210 ▲584.86 ▼0.79109.92 ▲3.2237.47 ▼8.49
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0439.76 ▼3.1434.96 ▼1.90
Add New Post /wp-admin/post-new.php1,536 ▲1623.30 ▲0.09615.39 ▼82.0957.09 ▲1.46
Media Library /wp-admin/upload.php1,389 ▲44.21 ▲0.0197.86 ▼8.9045.19 ▼5.51
Associate Image /wp-admin/tools.php?page=associate-attachment8131.7931.1528.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
2 plugin tags: media library, images

associate-attachment/associate-attachment.php 92% from 13 tests

This is the main PHP file of "Associate Attachment" version 1.7.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

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
Everything looks great! No dangerous files found in this plugin592 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP285149460
JavaScript211086
CSS11346

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity52.50
▷ Minimum class complexity2.00
▷ Maximum class complexity103.00
Average method complexity9.58
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods975.00%
▷ Protected methods00.00%
▷ Private methods325.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin