78% dashboard-for-mailgun

Code Review | Dashboard for Mailgun

WordPress plugin Dashboard for Mailgun scored78%from 54 tests.

About plugin

  • Plugin page: dashboard-for-mai...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 6.3.1
  • First release: Feb 5, 2018
  • Latest release: Feb 5, 2018
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: kmgalanakis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.10ms] Passed 4 tests

Server-side resources used by Dashboard for Mailgun
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.69 ▼0.42
Dashboard /wp-admin3.48 ▲0.1449.05 ▼8.22
Posts /wp-admin/edit.php3.59 ▲0.2448.03 ▼2.60
Add New Post /wp-admin/post-new.php6.06 ▲0.1786.83 ▼9.14
Media Library /wp-admin/upload.php3.40 ▲0.1738.73 ▲1.90
Dashboard /wp-admin/admin.php?page=dashboard-for-mailgun3.3935.26
Settings /wp-admin/admin.php?page=dashboard-for-mailgun-settings3.4034.65

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Dashboard for Mailgun
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲5214.75 ▲0.331.81 ▲0.0147.90 ▲3.47
Dashboard /wp-admin2,232 ▲444.82 ▼0.06104.25 ▼10.2543.20 ▲3.32
Posts /wp-admin/edit.php2,112 ▲232.01 ▲0.0236.83 ▼0.8938.22 ▲6.34
Add New Post /wp-admin/post-new.php1,553 ▲1723.08 ▼0.05705.04 ▲50.7457.65 ▼0.99
Media Library /wp-admin/upload.php1,411 ▲234.22 ▼0.14112.07 ▲16.3652.30 ▲11.85
Dashboard /wp-admin/admin.php?page=dashboard-for-mailgun8332.6559.5249.67
Settings /wp-admin/admin.php?page=dashboard-for-mailgun-settings8302.0836.3832.42

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant MAILGUN_DASHBOARD_PATH - assumed 'MAILGUN_DASHBOARD_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dashboard-for-mailgun/application/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dashboard-for-mailgun/dashboard-for-mailgun.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'MAILGUN_DASHBOARD_PATH/inc/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/dashboard-for-mailgun/application/bootstrap.php on line 8
    • > PHP Warning
      require_once(MAILGUN_DASHBOARD_PATH/inc/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/dashboard-for-mailgun/application/bootstrap.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dashboard-for-mailgun
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:1130 Uncaught TypeError: Cannot use 'in' operator to search for 'length' in Mailgun API key or domain, not set.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: email, dashboard, mail, transactional, mailgun...

dashboard-for-mailgun/dashboard-for-mailgun.php 92% from 13 tests

Analyzing the main PHP file in "Dashboard for Mailgun" version 0.1
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected35,788 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript75,8969,91623,792
CSS51,043428,668
SVG1002,671
PHP9168224657

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants14
▷ Global constants642.86%
▷ Class constants857.14%
▷ Public constants8100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/css/images/sort_desc.png0.15KB0.25KB0.00%
assets/css/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/css/images/sort_asc.png0.16KB0.25KB0.00%
assets/css/images/sort_both.png0.20KB0.29KB0.00%