74% watu-bridge-to-mailchimp

Code Review | Watu to MailChimp

WordPress plugin Watu to MailChimp scored74%from 54 tests.

About plugin

  • Plugin page: watu-bridge-to-ma...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Nov 16, 2021
  • Number of updates: 11
  • Update frequency: every 197.7 days
  • Top authors: prasunsen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,768 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.07ms] Passed 4 tests

A check of server-side resources used by Watu to MailChimp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.95 ▼2.10
Dashboard /wp-admin3.35 ▲0.0049.62 ▼11.59
Posts /wp-admin/edit.php3.40 ▲0.0450.37 ▼1.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.15 ▼13.08
Media Library /wp-admin/upload.php3.27 ▲0.0438.46 ▲1.49

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_watuchimp_relations
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Watu to MailChimp
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.36 ▲0.161.78 ▲0.1045.62 ▲2.97
Dashboard /wp-admin2,192 ▲155.52 ▼0.1382.56 ▼15.1637.97 ▲0.20
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0035.44 ▼0.4933.54 ▲0.69
Add New Post /wp-admin/post-new.php1,526 ▼223.32 ▲0.20684.09 ▼10.8570.14 ▼4.04
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.05112.82 ▲6.2849.03 ▲3.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_watuchimp_relations
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/watu-bridge-to-mailchimp/watu-chimp.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/watu-bridge-to-mailchimp/views/main.html.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: wpmu, survey, exam, mobile, touch...

watu-bridge-to-mailchimp/watu-chimp.php 92% from 13 tests

"Watu to MailChimp" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("watu-bridge-to-mailchimp.php" instead of "watu-chimp.php")

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
No dangerous file extensions were detected291 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47341291

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.50
▷ Minimum class complexity3.00
▷ Maximum class complexity36.00
Average method complexity7.17
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected