84% forms-mailcoach

Code Review | Mailcoach

WordPress plugin Mailcoach scored84%from 54 tests.

About plugin

  • Plugin page: forms-mailcoach
  • Plugin version: 0.0.10
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 8.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2023
  • Latest release: Jun 30, 2023
  • Number of updates: 10
  • Update frequency: every 2.8 days
  • Top authors: freekmurze (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.06ms] Passed 4 tests

An overview of server-side resources used by Mailcoach
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.47 ▼8.01
Dashboard /wp-admin3.31 ▲0.0051.22 ▲1.19
Posts /wp-admin/edit.php3.36 ▲0.0050.90 ▲0.70
Add New Post /wp-admin/post-new.php5.89 ▲0.00104.65 ▲12.65
Media Library /wp-admin/upload.php3.23 ▲0.0032.72 ▼6.13

Server storage [IO: ▲1.24MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 276 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Mailcoach
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.69 ▼0.0448.92 ▲8.42
Dashboard /wp-admin2,192 ▲155.62 ▼0.1092.31 ▼8.0242.53 ▲3.39
Posts /wp-admin/edit.php2,103 ▼02.02 ▼0.0039.99 ▲2.9535.09 ▼0.42
Add New Post /wp-admin/post-new.php1,526 ▼223.49 ▲0.60709.85 ▲26.6155.60 ▲4.11
Media Library /wp-admin/upload.php1,397 ▼34.27 ▼0.01100.54 ▼1.5245.75 ▼0.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 85× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/forms-mailcoach/src/Admin/views/show-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/forms-mailcoach/vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/forms-mailcoach/vendor/psr/http-client/src/NetworkExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack\\Autoloader\\jp0740443ce017f1531b490b73bd12e0c4\\wp_normalize_path() in wp-content/plugins/forms-mailcoach/vendor/jetpack-autoloader/class-path-processor.php:73
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/forms-mailcoach/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Parse error
      syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) in wp-content/plugins/forms-mailcoach/src/Admin/Data/CreateSubscriberData.php on line 23
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/forms-mailcoach/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/forms-mailcoach/vendor/guzzlehttp/psr7/src/Uri.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/forms-mailcoach/vendor/guzzlehttp/promises/src/EachPromise.php:13
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/forms-mailcoach/vendor/spatie/mailcoach-sdk-php/src/Actions/ManagesCampaigns.php on line 45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mailcoach, mass mailing, developer, spatie, mail

forms-mailcoach/wp-mailcoach.php 85% from 13 tests

The principal PHP file in "Mailcoach" v. 0.0.10 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("forms-mailcoach.php" instead of "wp-mailcoach.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin24,226 lines of code in 259 files:
LanguageFilesBlank linesComment linesLines of code
PHP2063,2747,37015,016
Markdown251,76704,619
JSON17103,118
CSS72661571,450
XML24117
Bourne Shell1103
JavaScript1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.79
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces31
Interfaces28
Traits7
Classes145
▷ Abstract classes00.00%
▷ Concrete classes145100.00%
▷ Final classes3524.14%
Methods1,071
▷ Static methods19518.21%
▷ Public methods89083.10%
▷ Protected methods171.59%
▷ Private methods16415.31%
Functions122
▷ Named functions1915.57%
▷ Anonymous functions10384.43%
Constants71
▷ Global constants00.00%
▷ Class constants71100.00%
▷ Public constants6084.51%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin