84% export-media-with-selected-content

Code Review | Export media with selected content

WordPress plugin Export media with selected content scored84%from 54 tests.

About plugin

  • Plugin page: export-media-with...
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Oct 15, 2016
  • Latest release: Aug 18, 2023
  • Number of updates: 35
  • Update frequency: every 71.4 days
  • Top authors: joostdekeijzer (100%)

Code review

54 tests

User reviews

88 reviews

Install metrics

40,000+ active /281,520 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.09ms] Passed 4 tests

An overview of server-side resources used by Export media with selected content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.09 ▼8.40
Dashboard /wp-admin3.34 ▲0.0445.99 ▼1.67
Posts /wp-admin/edit.php3.39 ▲0.0446.02 ▼3.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.44 ▼6.97
Media Library /wp-admin/upload.php3.27 ▲0.0433.97 ▼0.36

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

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

Browser metrics Passed 4 tests

Export media with selected content: 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.24 ▼1.171.69 ▼0.2238.92 ▼7.68
Dashboard /wp-admin2,206 ▲185.85 ▲0.98108.28 ▼7.7342.46 ▼7.39
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0040.05 ▲1.6835.26 ▲1.95
Add New Post /wp-admin/post-new.php1,533 ▼923.24 ▲4.99611.18 ▼42.8849.60 ▼14.68
Media Library /wp-admin/upload.php1,382 ▼34.19 ▼0.0299.48 ▼3.4942.93 ▼0.54

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/export-media-with-selected-content/export-media-with-content.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: attachments, export

export-media-with-selected-content/export-media-with-content.php 92% from 13 tests

The primary PHP file in "Export media with selected content" version 2.1.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("export-media-with-selected-content.php" instead of "export-media-with-content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected169 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13855169

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods333.33%
▷ 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

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