10% chimppress

Code Review | ChimpPress

WordPress plugin ChimpPress scored 10% from 54 tests.

About plugin

  • Plugin page: chimppress
  • Plugin version: 0.8.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.2.1
  • WordPress version: 5.8.1
  • First release: Nov 22, 2011
  • Latest release: Dec 14, 2012
  • Number of updates: 37
  • Update frequency: every 11.1 days
  • Top authors: jealousdesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 4,237 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/chimppress/includes/class-MCAPI.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; MCAPI has a deprecated constructor

Server metrics [RAM: ▼1.36MB] [CPU: ▼207.13ms] Passed 4 tests

This is a short check of server-side resources used by ChimpPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼0.456.39 ▼19.17
Dashboard /wp-admin2.30 ▼0.766.58 ▼32.30
Posts /wp-admin/edit.php2.30 ▼0.826.54 ▼36.96
Add New Post /wp-admin/post-new.php2.30 ▼3.146.45 ▼727.93
Media Library /wp-admin/upload.php2.30 ▼0.726.09 ▼31.32
ChimpPress /wp-admin/edit.php?post_type=chimppress2.306.37
Settings /wp-admin/edit.php?post_type=chimppress&page=chimppress-settings2.306.92
Feedback/About /wp-admin/edit.php?post_type=chimppress&page=chimppress-feedback2.305.66
Subscribers /wp-admin/edit.php?post_type=chimppress&page=chimppress-subscribers2.307.37
Add New Campaign /wp-admin/post-new.php?post_type=chimppress2.306.56

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 146 new files
Database: no new tables, 2 new options
New WordPress options
get_lists
campaigns

Browser metrics Passed 4 tests

This is an overview of browser requirements for ChimpPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,786 ▲19015.81 ▼0.358.34 ▼1.7354.38 ▲5.44
Dashboard /wp-admin3,066 ▲1295.88 ▼0.19139.71 ▼9.19153.28 ▲36.23
Posts /wp-admin/edit.php2,856 ▲1172.86 ▲0.1463.09 ▼4.02105.63 ▲12.91
Add New Post /wp-admin/post-new.php1,941 ▲43718.94 ▲0.41379.61 ▲20.43117.47 ▲8.75
Media Library /wp-admin/upload.php1,853 ▲435.01 ▼0.03132.64 ▼22.72155.86 ▲32.07
ChimpPress /wp-admin/edit.php?post_type=chimppress1,5512.7961.0185.74
Settings /wp-admin/edit.php?post_type=chimppress&page=chimppress-settings1,2122.4759.5686.15
Feedback/About /wp-admin/edit.php?post_type=chimppress&page=chimppress-feedback1,2052.4753.6586.22
Subscribers /wp-admin/edit.php?post_type=chimppress&page=chimppress-subscribers1,2202.3655.7190.86
Add New Campaign /wp-admin/post-new.php?post_type=chimppress3,6654.21152.09138.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/chimppress/includes/class-MCAPI.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; MCAPI has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • campaigns
    • get_lists

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Deprecated in wp-content/plugins/chimppress/includes/class-MCAPI.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; MCAPI has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=chimppress&page=chimppress-feedback
    • > Warning in wp-content/plugins/chimppress/includes/class-chimppress-feedback-page.php+36
    Use of undefined constant WP_ADMIN_URL - assumed 'WP_ADMIN_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/edit.php?post_type=chimppress&page=chimppress-subscribers
    • > Notice in wp-content/plugins/chimppress/includes/class-MCAPI.php+2464
    unserialize(): Error at offset 0 of 175 bytes
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Notice in wp-content/plugins/chimppress/includes/class-campaign-editor.php+44
    Undefined index: data
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Warning in wp-content/plugins/chimppress/includes/class-chimppress-stats.php+720
    Invalid argument supplied for foreach()
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Notice in wp-content/plugins/chimppress/includes/class-campaign-editor.php+44
    Trying to access array offset on value of type null

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/chimppress/js/populate.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MCAPI' not found in wp-content/plugins/chimppress/includes/class-mailchimp-api-functions.php:19
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/chimppress/chimppress.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chimppress/includes/class-chimppress-display.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'chimppress_meta_boxes' not found in wp-content/plugins/chimppress/includes/class-chimppress-setup.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chimppress/includes/class-ajax.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chimppress/includes/class-auto-send.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/chimppress/includes/class-mailchimp-api-functions.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=chimppress&page=chimppress-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: postboxes is not defined" "ReferenceError: postboxes is not defined\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=chimppress&page=chimppress-settings:171:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=chimppress&page=chimppress-subscribers
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught ReferenceError: postboxes is not defined
    • > GET request to /wp-admin/edit.php?post_type=chimppress&page=chimppress-feedback
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: postboxes is not defined" "ReferenceError: postboxes is not defined\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=chimppress&page=chimppress-feedback:171:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/edit.php?post_type=chimppress&page=chimppress-subscribers
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: postboxes is not defined" "ReferenceError: postboxes is not defined\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=chimppress&page=chimppress-subscribers:171:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:121:2)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'webkit')" "TypeError: Cannot read properties of undefined (reading 'webkit')\n at a._events (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:2692)\n at a._init (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:2307)\n at a.Draggable [as baseConstructor] (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:1734)\n at new a (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:14044)\n at HTMLDivElement.\u003Canonymous> (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:8240)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:3003)\n at s.fn.init.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:1481)\n at jSlider.create (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:8164)\n at jSlider.init (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:7027)\n at new jSlider (/wp-content/plugins/chimppress/js/scripts.js?ver=5.8.1:1808:6522)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:588:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:602:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:616:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:630:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:644:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:658:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at load_draggable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:182:26)\n at createDynamicTable (/wp-content/plugins/chimppress/js/editor.js?ver=5.8.1:502:2)\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=chimppress:672:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1:2:30340)" undefined
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=chimppress
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=5.8.1 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'webkit')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Manage your campaigns), #2 (Add options and layout preferences), #3 (More layout options), #4 (Choose from some basic templates), #5 (Add some content), #6 (Add an image), #7 (Added the image!), #8 (Apply some colour), #9 (Preview it!), #10 (Send it!), #11 (Get some stats about your campaign), #12 (The email!)
The official readme.txt is a good inspiration

chimppress/chimppress.php Passed 13 tests

The main file in "ChimpPress" v. 0.8.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
99 characters long description:
Manage Mailchimp campaigns and design bespoke HTML layouts using an intuitive drag and drop editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin19,126 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript233,1232,33013,085
PHP191,2211,8403,163
HTML24321232,208
CSS773168638
JSON70028
make1324

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity17.93
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods212
▷ Static methods00.00%
▷ Public methods212100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
44 PNG files occupy 1.41MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/select_template.png6.54KB2.86KB▼ 56.27%
img/mail.png0.15KB0.14KB▼ 5.16%
img/star_empty.png0.91KB0.81KB▼ 10.97%
img/chimppress_logo_16.png3.52KB1.08KB▼ 69.40%
screenshot-4.png57.37KB10.18KB▼ 82.26%