84% wp-attachment-export

Code Review | WP Attachment Export

WordPress plugin WP Attachment Export scored84%from 54 tests.

About plugin

  • Plugin page: wp-attachment-export
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2012
  • Latest release: May 23, 2016
  • Number of updates: 29
  • Update frequency: every 48.2 days
  • Top authors: helvetian (93.1%)swisswp (10.34%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active /51,634 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.94ms] Passed 4 tests

A check of server-side resources used by WP Attachment Export
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.02 ▼15.53
Dashboard /wp-admin3.33 ▲0.0352.26 ▼12.01
Posts /wp-admin/edit.php3.38 ▲0.0344.72 ▼7.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.86 ▼12.24
Media Library /wp-admin/upload.php3.25 ▲0.0236.43 ▲3.31
Attachment Export /wp-admin/tools.php?page=wp-attachment-export3.2231.24

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Attachment Export
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.55 ▼1.101.99 ▼1.5650.01 ▼13.34
Dashboard /wp-admin2,210 ▲255.87 ▲0.99120.23 ▼1.5648.38 ▼6.54
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0135.08 ▼11.9531.30 ▼6.61
Add New Post /wp-admin/post-new.php1,517 ▲317.47 ▼0.10676.21 ▼31.0851.82 ▼10.58
Media Library /wp-admin/upload.php1,395 ▲74.28 ▲0.11107.13 ▲5.0847.85 ▲3.65
Attachment Export /wp-admin/tools.php?page=wp-attachment-export8812.0322.5331.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-attachment-export/wp-attachment-export.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: images, media, image, export, admin...

wp-attachment-export/wp-attachment-export.php Passed 13 tests

The main PHP script in "WP Attachment Export" version 0.3.3 is automatically included on every request by WordPress
64 characters long description:
Exports only posts of type 'attachment', i.e. your media library

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
There were no executable files found in this plugin284 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File23234131
PHP1134799
Markdown132054

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin