10% circupress

Code Review | CircuPress

WordPress plugin CircuPress scored10%from 54 tests.

About plugin

  • Plugin page: circupress
  • Plugin version: 2.51
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Nov 10, 2013
  • Latest release: Jul 22, 2018
  • Number of updates: 57
  • Update frequency: every 30.1 days
  • Top authors: douglaskarr (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10+ active /4,455 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/circupress/inc/circupress_widget.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; circupress_optin_widget has a deprecated constructor

Server metrics [RAM: ▼1.17MB] [CPU: ▼50.99ms] Passed 4 tests

An overview of server-side resources used by CircuPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.648.72 ▼32.63
Dashboard /wp-admin2.84 ▼0.4610.31 ▼38.95
Posts /wp-admin/edit.php2.85 ▼0.519.76 ▼45.10
Add New Post /wp-admin/post-new.php2.84 ▼3.0512.57 ▼86.68
Media Library /wp-admin/upload.php2.85 ▼0.398.48 ▼33.24
Account /wp-admin/edit.php?post_type=email&page=circupress-account2.859.20
Editor /wp-admin/edit.php?post_type=email&page=circupress-template2.8512.55
Add New /wp-admin/post-new.php?post_type=email2.8512.31
Template Preview /wp-admin/admin.php?page=circupress-template-preview2.8516.34
Support /wp-admin/edit.php?post_type=email&page=circupress-support2.8511.39
All Emails /wp-admin/edit.php?post_type=email2.859.93
Subscribers /wp-admin/edit.php?post_type=email&page=circupress-subscribers2.859.49

Server storage [IO: ▲0.84MB] [DB: ▲0.03MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 9 new options
New WordPress options
circupress-email-editor
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
circupress-account
widget_circupress-email-optin

Browser metrics Passed 4 tests

A check of browser resources used by CircuPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲23713.62 ▼1.065.79 ▲3.9936.84 ▼5.98
Dashboard /wp-admin2,260 ▲754.88 ▼0.93111.23 ▲10.3644.36 ▲2.16
Posts /wp-admin/edit.php2,153 ▲642.08 ▲0.0442.05 ▲6.0936.54 ▲6.04
Add New Post /wp-admin/post-new.php1,588 ▲6018.31 ▼4.92599.55 ▼81.2056.22 ▲4.25
Media Library /wp-admin/upload.php1,456 ▲714.33 ▲0.13101.77 ▲1.1442.78 ▼4.10
Account /wp-admin/edit.php?post_type=email&page=circupress-account1,7872.5142.0541.06
Editor /wp-admin/edit.php?post_type=email&page=circupress-template2,1327.23151.64104.84
Add New /wp-admin/post-new.php?post_type=email2,3047.76157.4264.89
Template Preview /wp-admin/admin.php?page=circupress-template-preview8722.0132.6424.33
Support /wp-admin/edit.php?post_type=email&page=circupress-support1,5422.4042.2634.50
All Emails /wp-admin/edit.php?post_type=email1,3312.3238.2632.44
Subscribers /wp-admin/edit.php?post_type=email&page=circupress-subscribers1,8062.5341.2940.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/circupress/inc/circupress_widget.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; circupress_optin_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 9 options
    • circupress-email-editor
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_circupress-email-optin
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • circupress-account

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Deprecated in wp-content/plugins/circupress/inc/circupress_widget.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; circupress_optin_widget has a deprecated constructor
  • 63 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+1351
    Illegal string offset 'wpcp_apikey'
  • 374 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Notice in wp-content/plugins/circupress/inc/functions.php+1351
    Uninitialized string offset: 0
  • 53 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Notice in wp-content/plugins/circupress/inc/subscribers.php+408
    Trying to access array offset on value of type null
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/subscribers.php+389
    Illegal string offset 'wpcp_daily_template'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/subscribers.php+388
    Illegal string offset 'wpcp_weekly_template'
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+392
    Illegal string offset 'wpcp_email_schedule'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+732
    Illegal string offset 'wpcp_email_from_name'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+827
    Illegal string offset 'wpcp_email_canspam'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+764
    Illegal string offset 'wpcp_email_street'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+778
    Illegal string offset 'wpcp_email_city'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+792
    Illegal string offset 'wpcp_email_province'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+806
    Illegal string offset 'wpcp_email_postal_code'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+816
    Illegal string offset 'wpcp_email_phone_number'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+752
    Illegal string offset 'wpcp_email_company_name'
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+742
    Illegal string offset 'wpcp_email_from_email'
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+234
    Illegal string offset 'wpcp_email_template'
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Notice in wp-content/plugins/circupress/inc/functions.php+347
    Undefined variable: i
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Notice in wp-content/plugins/circupress/inc/functions.php+352
    Undefined variable: select
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+263
    Illegal string offset 'wpcp_daily_subject'
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+291
    Illegal string offset 'wpcp_weekly_subject'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+872
    Illegal string offset 'wpcp_social_rss'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+885
    Illegal string offset 'wpcp_social_fb'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+911
    Illegal string offset 'wpcp_social_google_plus'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+937
    Illegal string offset 'wpcp_social_instagram'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+924
    Illegal string offset 'wpcp_social_linkedin'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+950
    Illegal string offset 'wpcp_social_pinterest'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+898
    Illegal string offset 'wpcp_social_twitter'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/functions.php+963
    Illegal string offset 'wpcp_social_youtube'
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-template
    • > Deprecated in wp-content/plugins/circupress/inc/circupress_editor.php+41
    The each() function is deprecated. This message will be suppressed on further calls
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-template
    • > Notice in wp-content/plugins/circupress/inc/circupress_editor.php+62
    Undefined index: action
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-template
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-template
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-template
    • > Notice in wp-content/plugins/circupress/inc/circupress_editor.php+202
    Undefined variable: error
    • > GET request to /wp-admin/admin.php?page=circupress-template-preview
    • > Notice in wp-content/plugins/circupress/inc/functions.php+985
    Undefined index: post_type
    • > GET request to /wp-admin/admin.php?page=circupress-template-preview
    • > Warning in wp-content/plugins/circupress/inc/functions.php+204
    include(circupress_template_view.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=circupress-template-preview
    • > Warning in wp-content/plugins/circupress/inc/functions.php+204
    include(): Failed opening 'circupress_template_view.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/subscribers.php+17
    Illegal string offset 'wpcp_account'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=email&page=circupress-subscribers
    • > Warning in wp-content/plugins/circupress/inc/subscribers.php+472
    Invalid argument supplied for foreach()

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/circupress/templates/scheduled-v2-5.php
    • > /wp-content/plugins/circupress/templates/ondemand-v2-5.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/circupress/inc/functions.php:77
    • > PHP Warning
      include_once(ABSPATHWPINC/feed.php): failed to open stream: No such file or directory in wp-content/plugins/circupress/inc/ouibounce.php on line 8
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/circupress/inc/ouibounce.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/circupress/inc/circupress_editor.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/circupress/inc/support.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_content() in wp-content/plugins/circupress/templates/scheduled-v2-5.php:220
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/circupress/inc/account.php:8
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/feed.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/circupress/inc/support.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/circupress/config.php:8
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/circupress/inc/support.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=email
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).pointer is not a function" "TypeError: $(...).pointer is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=email:1866:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=email
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).pointer is not a function
    • > GET request to /wp-admin/edit.php?post_type=email
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).pointer is not a function" "TypeError: $(...).pointer is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=email:312:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=email
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).pointer is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Emails that have been sent are listed just like posts, with your campaign metrics.), #2 (Send an On Demand email any time simply by writing and publishing your email.), #3 (Manage your subscribers, add, edit and import subscribers.), #4 (Manage your account and set your templates.), #5 (Utilize our CircuPress support page to see the latest product information and get started.), #6 (Customize your templates with a simple image header upload.), #7 (Customize your templates with an advanced editing tab where you have full control.), #8 (Preview your templates in real-time.)
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

circupress/circupress.php 92% from 13 tests

"CircuPress" version 2.51's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 274 characters long)

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
Good job! No executable or dangerous file extensions detected3,988 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,0563803,906
JavaScript37657
CSS13225

PHP code Passed 2 tests

An short overview of 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.26
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions119
▷ Named functions11899.16%
▷ Anonymous functions10.84%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
22 PNG files occupy 0.62MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png55.96KB56.86KB0.00%
images/alert.png0.49KB0.43KB▼ 12.92%
screenshot-4.png63.49KB63.77KB0.00%
images/tweet.png1.10KB0.24KB▼ 78.48%
images/circupress-75.png2.82KB1.27KB▼ 54.94%