74% wcf-newsletter-email-campaign

Code Review | WCF Newsletter & Email Campaign

WordPress plugin WCF Newsletter & Email Campaign scored74%from 54 tests.

About plugin

  • Plugin page: wcf-newsletter-em...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2022
  • Latest release: Nov 28, 2022
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: wecode123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /462 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.29ms] Passed 4 tests

Server-side resources used by WCF Newsletter & Email Campaign
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.41 ▼3.41
Dashboard /wp-admin3.32 ▲0.0254.93 ▲8.18
Posts /wp-admin/edit.php3.37 ▲0.0145.89 ▼1.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.78 ▲5.20
Media Library /wp-admin/upload.php3.24 ▲0.0137.25 ▲0.78
WCF Newsletter & Campaign /wp-admin/admin.php?page=wcf-newsletter-email-campaign3.2734.60
Campaigns /wp-admin/admin.php?page=wcf-campaigns-list3.2432.91
Subscriber List /wp-admin/admin.php?page=wcf-newsletter-subscriber3.2428.17

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_wcf_camp_list
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WCF Newsletter & Email Campaign
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17913.44 ▼0.941.78 ▼0.2341.18 ▼4.13
Dashboard /wp-admin2,289 ▲985.41 ▲0.53119.57 ▲20.3539.97 ▼1.74
Posts /wp-admin/edit.php2,143 ▲542.31 ▲0.2742.80 ▲6.1529.52 ▼5.74
Add New Post /wp-admin/post-new.php1,575 ▲5623.34 ▲0.04566.10 ▼95.9428.44 ▼34.15
Media Library /wp-admin/upload.php1,537 ▲1464.64 ▲0.41101.24 ▼10.3337.93 ▼6.90
WCF Newsletter & Campaign /wp-admin/admin.php?page=wcf-newsletter-email-campaign1,6367.09129.2551.99
Campaigns /wp-admin/admin.php?page=wcf-campaigns-list9772.3853.9327.70
Subscriber List /wp-admin/admin.php?page=wcf-newsletter-subscriber9672.8148.0224.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_wcf_camp_list
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_charset_collate() on null in wp-content/plugins/wcf-newsletter-email-campaign/campaign_list.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wcf-newsletter-email-campaign/subscribers_list.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/wcf-newsletter-email-campaign/welcome_wcf_newsletter_campaign.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wcf-newsletter-email-campaign/wcf_newsletter_email_campaign.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: woocommerce

wcf-newsletter-email-campaign/wcf_newsletter_email_campaign.php 92% from 13 tests

"WCF Newsletter & Email Campaign" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wcf-newsletter-email-campaign.php" instead of "wcf_newsletter_email_campaign.php")

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
Success! There were no dangerous files found in this plugin7,499 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,0446,8856,663
CSS2836541
PHP49526295

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin