10% attachment-files-importer

Code Review | Attachment Files Importer

WordPress plugin Attachment Files Importer scored10%from 54 tests.

About plugin

  • Plugin page: attachment-files-...
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Jun 28, 2013
  • Latest release: Jan 31, 2014
  • Number of updates: 14
  • Update frequency: every 15.5 days
  • Top authors: KLicheR (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /7,152 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/attachment-files-importer/attachment-files-importer.php+50
    Methods with the same name as their class will not be constructors in a future version of PHP; AF_Import has a deprecated constructor

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.51ms] Passed 4 tests

Analyzing server-side resources used by Attachment Files Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.99 ▼4.05
Dashboard /wp-admin3.31 ▲0.0148.16 ▼5.09
Posts /wp-admin/edit.php3.42 ▲0.0748.35 ▲0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.63 ▼12.93
Media Library /wp-admin/upload.php3.23 ▲0.0036.23 ▲1.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Attachment Files Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.79 ▼1.011.70 ▲0.0042.73 ▼8.93
Dashboard /wp-admin2,209 ▲215.86 ▲0.95100.37 ▼30.8938.71 ▼2.03
Posts /wp-admin/edit.php2,089 ▼02.12 ▲0.0739.97 ▼2.4535.04 ▼1.09
Add New Post /wp-admin/post-new.php1,536 ▲323.35 ▲0.18672.61 ▼16.0257.13 ▼0.31
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0198.06 ▼5.3542.07 ▼6.64

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

attachment-files-importer/attachment-files-importer.php Passed 13 tests

"Attachment Files Importer" version 0.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
120 characters long description:
Scan your Wordpress installation for all missing attachment files and download them from another Wordpress installation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin435 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP183131338
PO File1293697

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 files were detected