10% blackbaud-sphere

Code Review | Sphere

WordPress plugin Sphere scored10%from 54 tests.

About plugin

  • Plugin page: blackbaud-sphere
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2014
  • Latest release: Nov 18, 2015
  • Number of updates: 21
  • Update frequency: every 27.5 days
  • Top authors: Dave Bergschneider (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /926 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/blackbaud-sphere/redux/core/extensions/customizer/extension_customizer.php+545
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▼0.88MB] [CPU: ▼51.95ms] Passed 4 tests

Analyzing server-side resources used by Sphere
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.11 ▼0.369.88 ▼34.87
Dashboard /wp-admin3.13 ▼0.1810.93 ▼40.30
Posts /wp-admin/edit.php3.13 ▼0.2310.87 ▼39.92
Add New Post /wp-admin/post-new.php3.13 ▼2.7612.27 ▼92.72
Media Library /wp-admin/upload.php3.13 ▼0.1012.72 ▼28.00
Event Settings /wp-admin/admin.php?page=_options&tab=03.1310.49
Sync Settings /wp-admin/admin.php?page=_options&tab=13.1312.16
Code Settings /wp-admin/admin.php?page=_options&tab=23.1311.33

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 454 new files
Database: 2 new tables, 7 new options
New tables
wp_supporters
wp_teamsupporters
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
Redux_Tracking_Hash

Browser metrics Passed 4 tests

Checking browser requirements for Sphere
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲6413.99 ▼0.461.78 ▼0.0747.97 ▲5.83
Dashboard /wp-admin2,245 ▲655.57 ▼0.0183.99 ▼16.7940.28 ▲2.05
Posts /wp-admin/edit.php2,153 ▲562.01 ▼0.0035.85 ▼1.2734.86 ▼1.50
Add New Post /wp-admin/post-new.php1,566 ▲3723.24 ▼0.34600.69 ▼39.0051.18 ▼4.36
Media Library /wp-admin/upload.php1,453 ▲534.23 ▲0.06100.98 ▼8.2641.79 ▼1.30
Event Settings /wp-admin/admin.php?page=_options&tab=01,2574.4568.3337.94
Sync Settings /wp-admin/admin.php?page=_options&tab=11,2534.3668.1434.29
Code Settings /wp-admin/admin.php?page=_options&tab=21,2534.3751.4733.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/blackbaud-sphere/redux/core/extensions/customizer/extension_customizer.php+545
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_teamsupporters
    • wp_supporters
  • The uninstall procedure has failed, leaving 7 options in the database
    • Redux_Tracking_Hash
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > Warning in wp-content/plugins/blackbaud-sphere/redux/core/extensions/customizer/extension_customizer.php+685
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > Notice in wp-content/plugins/blackbaud-sphere/redux/core/inc/tracking.php+73
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > Deprecated in wp-content/plugins/blackbaud-sphere/sync/lib/webrequest.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; WebRequest has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > Notice in wp-content/plugins/blackbaud-sphere/redux/core/framework.php+5771
    Undefined variable: admin_username
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > Notice in wp-content/plugins/blackbaud-sphere/redux/core/framework.php+5775
    Undefined variable: activation_key

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/blackbaud-sphere/sync/lib/ez_sql.php
  • 151× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/blackbaud-sphere/redux/core/inc/validation/str_replace/validation_str_replace.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/plugins/Scripts/fix_webroot.php on line 22
    • > PHP Warning
      require_once(Zend/Validate/Hostname/Interface.php): failed to open stream: No such file or directory in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/Zend/Validate/Hostname/De.php on line 79
    • > PHP Warning
      require_once(Zend/Validate/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/Zend/Validate/File/Upload.php on line 73
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/Zend/Validate/Float.php on line 79
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/Zend/Validate/Barcode.php on line 79
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/Zend/Validate/File/ImageSize.php on line 73
    • > PHP Notice
      Undefined variable: self in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/plugins/Scripts/fix_webroot.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/blackbaud-sphere/redux/core/inc/validation/email_not_empty/validation_email_not_empty.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Uri/Http.php' (include_path='.:/usr/share/php') in wp-content/plugins/blackbaud-sphere/sync/lib/phpQuery/phpQuery/Zend/Http/Client/Adapter/Proxy.php on line 70

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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > Javascript (severe) in unknown
    /wp-content/plugins/blackbaud-sphere/redux/core/assets/js/redux.min.js?ver=1407160440 2:13121 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
    • > GET request to /wp-admin/admin.php?page=_options&tab=0
    • > 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: $(...).live is not a function" "TypeError: $(...).live is not a function\n at $.redux.reports (/wp-content/plugins/blackbaud-sphere/redux/core/inc/fields/reports/field_reports.js?ver=1697745064:25:23)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/blackbaud-sphere/redux/core/inc/fields/reports/field_reports.js?ver=1697745064:17:11)\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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=_options&tab=2
    • > 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: $(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=_options&tab=1
    • > 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: $(...).live is not a function" "TypeError: $(...).live is not a function\n at $.redux.reports (/wp-content/plugins/blackbaud-sphere/redux/core/inc/fields/reports/field_reports.js?ver=1697745066:25:23)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/blackbaud-sphere/redux/core/inc/fields/reports/field_reports.js?ver=1697745066:17:11)\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/admin.php?page=_options&tab=2
    • > 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: $(...).live is not a function" "TypeError: $(...).live is not a function\n at $.redux.reports (/wp-content/plugins/blackbaud-sphere/redux/core/inc/fields/reports/field_reports.js?ver=1697745068:25:23)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/blackbaud-sphere/redux/core/inc/fields/reports/field_reports.js?ver=1697745068:17:11)\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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Event Settings), #2 (Sync Settings), #3 (Code Settings)
You can look at the official readme.txt

blackbaud-sphere/sphere.php 85% from 13 tests

Analyzing the main PHP file in "Sphere" version 1.5.0
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 ("blackbaud-sphere.php" instead of "sphere.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 199 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin45,151 lines of code in 369 files:
LanguageFilesBlank linesComment linesLines of code
PHP1604,85014,88025,402
JavaScript1141,3401,1937,037
CSS343072294,205
XML1004,026
LESS26210492,898
Sass24301,048
SVG100309
Markdown228064
HTML28061
Bourne Shell121052
JSON30045
SQL1004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity32.05
▷ Minimum class complexity1.00
▷ Maximum class complexity574.00
Average method complexity5.32
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes161
▷ Abstract classes84.97%
▷ Concrete classes15395.03%
▷ Final classes00.00%
Methods1,201
▷ Static methods15212.66%
▷ Public methods1,08890.59%
▷ Protected methods998.24%
▷ Private methods141.17%
Functions59
▷ Named functions59100.00%
▷ Anonymous functions00.00%
Constants135
▷ Global constants3122.96%
▷ Class constants10477.04%
▷ Public constants104100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
42 PNG files occupy 0.70MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
redux/core/assets/img/1c.png0.13KB0.13KB▼ 0.72%
redux/core/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
redux/core/inc/fields/switch/slider-control.png1.65KB0.75KB▼ 54.62%
screenshot-2.png98.79KB43.24KB▼ 56.23%
redux/core/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%