84% email-media-import

Code Review | Email Media Import

WordPress plugin Email Media Import scored84%from 54 tests.

About plugin

  • Plugin page: email-media-import
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2016
  • Latest release: Oct 24, 2016
  • Number of updates: 9
  • Update frequency: every 1.1 days
  • Top authors: metatavu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /835 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
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.36ms] Passed 4 tests

An overview of server-side resources used by Email Media Import
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2144.35 ▲2.76
Dashboard /wp-admin3.40 ▲0.0957.97 ▲9.86
Posts /wp-admin/edit.php3.51 ▲0.1550.44 ▼3.87
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.12 ▼3.52
Media Library /wp-admin/upload.php3.32 ▲0.0940.37 ▲6.08
Email Media Import /wp-admin/options-general.php?page=email_media_import_settings3.2634.28

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Email Media Import
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.58 ▼0.402.14 ▲0.1745.53 ▼2.40
Dashboard /wp-admin2,207 ▲194.88 ▲0.01115.32 ▲0.3342.31 ▲2.61
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0136.73 ▼4.7134.30 ▼5.80
Add New Post /wp-admin/post-new.php1,537 ▲1123.19 ▲0.13664.76 ▼11.6265.31 ▲13.07
Media Library /wp-admin/upload.php1,392 ▲44.29 ▲0.1098.15 ▼5.2247.37 ▲0.56
Email Media Import /wp-admin/options-general.php?page=email_media_import_settings8512.1728.4028.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=email_media_import_settings
    • > Notice in wp-content/plugins/email-media-import/settings.php+83
    Trying to access array offset on value of type bool

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: mailgun, email, media

email-media-import/email-media-import.php Passed 13 tests

The main file in "Email Media Import" v. 0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
Plugin for importing media via email

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin428 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP811419414
Markdown19014

PHP code Passed 2 tests

A short 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 complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1780.95%
▷ Protected methods00.00%
▷ Private methods419.05%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin