78% wpmandrill

Code Review | wpMandrill

WordPress plugin wpMandrill scored78%from 54 tests.

About plugin

  • Plugin page: wpmandrill
  • Plugin version: 1.33
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Apr 26, 2012
  • Latest release: Sep 25, 2015
  • Number of updates: 54
  • Update frequency: every 23.1 days
  • Top authors: MC_Will (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

7,000+ active /170,355 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
Installer ran successfully

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

This is a short check of server-side resources used by wpMandrill
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2945.69 ▲2.74
Dashboard /wp-admin3.49 ▲0.1441.46 ▼26.10
Posts /wp-admin/edit.php3.56 ▲0.2042.65 ▼4.58
Add New Post /wp-admin/post-new.php5.74 ▼0.1577.20 ▼27.48
Media Library /wp-admin/upload.php3.50 ▲0.2735.36 ▼1.73
Mandrill /wp-admin/options-general.php?page=wpmandrill3.4730.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for wpMandrill
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.60 ▼0.151.93 ▲0.1645.21 ▲0.68
Dashboard /wp-admin2,206 ▲295.59 ▼0.0893.27 ▲3.2942.90 ▼0.02
Posts /wp-admin/edit.php2,108 ▲112.01 ▼0.0136.02 ▼6.0038.32 ▼2.14
Add New Post /wp-admin/post-new.php1,535 ▲923.10 ▼0.08686.50 ▲25.1160.00 ▲6.63
Media Library /wp-admin/upload.php1,411 ▲114.20 ▲0.03102.25 ▼8.1342.17 ▼5.66
Mandrill /wp-admin/options-general.php?page=wpmandrill9242.0327.4340.15

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpmandrill
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wpmandrill/legacy/function.wp_mail.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpmandrill/wpmandrill.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wpmandrill/stats.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Settings screen), #2 (Statistics), #3 (Dashboard widget), #4 (Dashboard widget Settings)
The official readme.txt is a good inspiration

wpmandrill/wpmandrill.php Passed 13 tests

The main PHP file in "wpMandrill" ver. 1.33 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
wpMandrill sends emails, generated by WordPress using Mandrill.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin5,099 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP65514152,262
JavaScript44402952,193
PO File2271346580
CSS14064

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity63.00
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods107
▷ Static methods7065.42%
▷ Public methods107100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mandrill-head-icon.png2.50KB1.72KB▼ 31.08%
images/FreddieHead.png7.60KB3.65KB▼ 51.98%
images/MandrillHead.png8.28KB3.86KB▼ 53.43%