74% wp-chimp

Code Review | WP Chimp

WordPress plugin WP Chimp scored 74% from 54 tests.

About plugin

  • Plugin page: wp-chimp
  • Plugin version: 0.7.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Jul 6, 2018
  • Latest release: Aug 9, 2019
  • Number of updates: 34
  • Update frequency: every 11.7 days
  • Top authors: tfirdaus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,142 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲1.92ms] Passed 4 tests

A check of server-side resources used by WP Chimp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2046.72 ▲3.54
Dashboard /wp-admin3.50 ▲0.1956.03 ▼4.93
Posts /wp-admin/edit.php3.55 ▲0.1955.32 ▼0.31
Add New Post /wp-admin/post-new.php6.02 ▲0.14110.05 ▲15.88
Media Library /wp-admin/upload.php3.36 ▲0.1347.91 ▲9.37
MailChimp /wp-admin/options-general.php?page=wp-chimp3.3839.26

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 60 new files
Database: 1 new table, 8 new options
New tables
wp_chimp_lists
New WordPress options
db_upgraded
widget_wp-chimp-subscription-form
wp_chimp_lists_db_version
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Chimp
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲10113.70 ▲0.499.84 ▲7.8443.13 ▼4.94
Dashboard /wp-admin2,210 ▲45.85 ▲0.0199.59 ▼16.5642.43 ▼2.86
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0435.00 ▼6.9233.25 ▼2.51
Add New Post /wp-admin/post-new.php6,421 ▲4,88620.17 ▼2.79844.75 ▲109.8468.60 ▼3.22
Media Library /wp-admin/upload.php1,386 ▲14.15 ▼0.07101.47 ▼4.3240.58 ▼4.56
MailChimp /wp-admin/options-general.php?page=wp-chimp1,1588.95187.3027.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_chimp_lists
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_wp-chimp-subscription-form
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp_chimp_lists_db_version
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following
  • 33× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-chimp/src/core/lists/class-query.php
    • > /wp-content/plugins/wp-chimp/src/core/class-languages.php
    • > /wp-content/plugins/wp-chimp/src/admin/partials/class-page.php
    • > /wp-content/plugins/wp-chimp/src/subscription-form/class-subscription-form.php
    • > /wp-content/plugins/wp-chimp/src/subscription-form/class-shortcode.php
    • > /wp-content/plugins/wp-chimp/src/admin/partials/interface-tab.php
    • > /wp-content/plugins/wp-chimp/src/admin/partials/class-fields.php
    • > /wp-content/plugins/wp-chimp/src/subscription-form/template-tags.php
    • > /wp-content/plugins/wp-chimp/src/core/functions.php
    • > /wp-content/plugins/wp-chimp/src/core/endpoints/class-rest-subscription-forms-controller.php

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 Passed 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
6 plugin tags: widget, form, shortocode, gutenberg, subscription...

wp-chimp/wp-chimp.php Passed 13 tests

The primary PHP file in "WP Chimp" version 0.7.4 is used by WordPress to initiate all plugin functionality
53 characters long description:
Lean MailChimp subscription form plugin for WordPress

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
Good job! No executable or dangerous file extensions detected7,510 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,1333,2173,638
JavaScript105787432,939
CSS81684933

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces8
Interfaces2
Traits2
Classes28
▷ Abstract classes310.71%
▷ Concrete classes2589.29%
▷ Final classes00.00%
Methods258
▷ Static methods5521.32%
▷ Public methods21583.33%
▷ Protected methods207.75%
▷ Private methods238.91%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants12
▷ Global constants541.67%
▷ Class constants758.33%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin