78% mailwizz-newsletter-box

Code Review | MailWizz Newsletter Box

WordPress plugin MailWizz Newsletter Box scored78%from 54 tests.

About plugin

  • Plugin page: mailwizz-newslett...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Nov 13, 2013
  • Latest release: Dec 10, 2018
  • Number of updates: 7
  • Update frequency: every 264.9 days
  • Top authors: twisted1919 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,401 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼12.13ms] Passed 4 tests

Server-side resources used by MailWizz Newsletter Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.31 ▼3.02
Dashboard /wp-admin3.45 ▲0.1144.68 ▼20.06
Posts /wp-admin/edit.php3.57 ▲0.2151.93 ▲6.25
Add New Post /wp-admin/post-new.php6.05 ▲0.1782.73 ▼30.12
Media Library /wp-admin/upload.php3.38 ▲0.1536.68 ▲4.69

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

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

Browser metrics Passed 4 tests

Checking browser requirements for MailWizz Newsletter Box
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.45 ▼0.938.67 ▲6.9345.09 ▲1.12
Dashboard /wp-admin2,200 ▲265.65 ▲0.1090.84 ▼0.1142.25 ▼0.56
Posts /wp-admin/edit.php2,102 ▼12.06 ▲0.0932.87 ▼7.0030.90 ▼6.72
Add New Post /wp-admin/post-new.php1,528 ▼023.25 ▲0.27641.05 ▲24.8861.28 ▲13.04
Media Library /wp-admin/upload.php1,402 ▼14.23 ▲0.0292.21 ▼9.0943.43 ▼1.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_mwznb
    • can_compress_scripts

Smoke tests 50% 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 0% 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
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/list_segments.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/list_subscribers.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/lists_create.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/ajax_subscribe.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/transactional_emails.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/campaigns.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/templates.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/lists.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/campaigns_tracking.php
    • > /wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/examples/list_fields.php
  • 23× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Base' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Params.php:65
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Cache_Abstract' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Cache/Xcache.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Cache_Abstract' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Cache/File.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Cache_Abstract' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Cache/Apc.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Base' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Endpoint/Customers.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mailwizz-newsletter-box/mailwizz-newsletter-box.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Base' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Endpoint/CampaignBounces.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Base' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Config.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Base' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Endpoint/Campaigns.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MailWizzApi_Base' not found in wp-content/plugins/mailwizz-newsletter-box/vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Endpoint/ListSegments.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 uses markdown syntax to describe your plugin to the world
4 plugin tags: email marketing, email, newsletter, newsletter box

mailwizz-newsletter-box/mailwizz-newsletter-box.php 92% from 13 tests

The main file in "MailWizz Newsletter Box" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 434 characters long)

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
There were no executable files found in this plugin3,574 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP518292,5503,275
JavaScript220074
HTML22073
CSS110069
JSON30069
Markdown26014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.30
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes30
▷ Abstract classes13.33%
▷ Concrete classes2996.67%
▷ Final classes00.00%
Methods187
▷ Static methods168.56%
▷ Public methods17493.05%
▷ Protected methods126.42%
▷ Private methods10.53%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ss-2.PNG11.72KB6.73KB▼ 42.57%
ss-1.PNG23.66KB13.32KB▼ 43.69%
ss-3.PNG31.68KB11.90KB▼ 62.44%