84% mailchimp-top-bar

Code Review | MC4WP: Mailchimp Top Bar

WordPress plugin MC4WP: Mailchimp Top Bar scored84%from 54 tests.

About plugin

  • Plugin page: mailchimp-top-bar
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Jan 13, 2023
  • Number of updates: 118
  • Update frequency: every 24.6 days
  • Top authors: DvanKooten (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

10,000+ active /298,421 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by MC4WP: Mailchimp Top Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.20 ▼7.06
Dashboard /wp-admin3.31 ▲0.0143.03 ▼3.47
Posts /wp-admin/edit.php3.36 ▲0.0146.67 ▼6.85
Add New Post /wp-admin/post-new.php5.89 ▼0.0091.50 ▲1.37
Media Library /wp-admin/upload.php3.23 ▲0.0036.70 ▲2.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by MC4WP: Mailchimp Top Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.27 ▼0.131.50 ▼0.0142.55 ▼0.04
Dashboard /wp-admin2,214 ▲375.64 ▲0.1189.52 ▼2.6940.16 ▼5.67
Posts /wp-admin/edit.php2,128 ▲252.02 ▲0.0140.61 ▼1.9338.97 ▲3.86
Add New Post /wp-admin/post-new.php1,542 ▲723.79 ▲5.65659.87 ▲24.2755.32 ▼11.55
Media Library /wp-admin/upload.php1,427 ▲274.22 ▼0.04100.71 ▲3.4941.76 ▼1.61

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailchimp-top-bar/dependencies.php:9

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)
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
8 plugin tags: mc4wp, mailchimp, call to action, newsletter, opt-in...

mailchimp-top-bar/mailchimp-top-bar.php 92% from 13 tests

The principal PHP file in "MC4WP: Mailchimp Top Bar" v. 1.6.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,591 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP183496551,375
Markdown11830205
XML1209
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.33
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods67
▷ Static methods1826.87%
▷ Public methods5683.58%
▷ Protected methods68.96%
▷ Private methods57.46%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin