10% offsprout-page-builder

Code Review | Offsprout Page Builder

WordPress plugin Offsprout Page Builder scored 10% from 54 tests.

About plugin

  • Plugin page: offsprout-page-bu...
  • Plugin version: 2.15.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5
  • WordPress version: 5.8.1
  • First release: Oct 16, 2017
  • Latest release: Aug 17, 2020
  • Number of updates: 56
  • Update frequency: every 18.6 days
  • Top authors: offsprout (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 8,655 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/offsprout-page-builder/includes/class-offsprout-model.php+1383
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.53MB] [CPU: ▼195.60ms] Passed 4 tests

Server-side resources used by Offsprout Page Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼0.746.27 ▼33.34
Dashboard /wp-admin2.11 ▼0.946.32 ▼38.67
Posts /wp-admin/edit.php2.12 ▼0.996.99 ▼45.66
Add New Post /wp-admin/post-new.php2.12 ▼3.326.67 ▼656.39
Media Library /wp-admin/upload.php2.12 ▼0.896.43 ▼41.69
Builder /wp-admin/options-general.php?page=offsprout-settings2.125.96

Server storage [IO: ▲29.07MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • Try to limit filesystem usage to 25MB (currently using 29.07MB)
Filesystem: 448 new files
Database: 1 new table, 2 new options
New tables
wp_ocb_revisions
New WordPress options
ocb_meta_db_version
ocb_install_ran

Browser metrics Passed 4 tests

A check of browser resources used by Offsprout Page Builder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,874 ▲27817.39 ▲1.7630.04 ▲19.8253.38 ▼1.43
Dashboard /wp-admin2,999 ▲656.06 ▼0.04143.52 ▼2.33119.38 ▲0.28
Posts /wp-admin/edit.php2,777 ▲412.70 ▲0.0169.45 ▼5.2989.63 ▼5.62
Add New Post /wp-admin/post-new.php1,689 ▲10821.84 ▲5.45284.84 ▼156.16117.28 ▼7.81
Media Library /wp-admin/upload.php1,834 ▲275.05 ▲0.01151.42 ▼15.27124.09 ▼4.99
Builder /wp-admin/options-general.php?page=offsprout-settings2,28910.57308.48150.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/offsprout-page-builder/includes/class-offsprout-model.php+1383
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ocb_revisions
  • This plugin does not fully uninstall, leaving 2 options in the database
    • ocb_meta_db_version
    • ocb_install_ran

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=offsprout-settings
    • > Deprecated in wp-content/plugins/offsprout-page-builder/includes/class-offsprout-model.php+1383
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

SRP 50% 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 take a closer look at the following
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/offsprout-page-builder/admin/screens/admin-settings-js-config.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/offsprout-page-builder/templates/offsprout-editor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/offsprout-page-builder/admin/class-offsprout-admin-settings.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/offsprout-page-builder/public/class-offsprout-shortcodes.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/offsprout-page-builder/api/class-offsprout-api-extensions.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/offsprout-page-builder/admin/importer/class-offsprout-importer.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Offsprout_Model' not found in wp-content/plugins/offsprout-page-builder/admin/class-offsprout-add-editor-button.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/offsprout-page-builder/admin/screens/admin-settings-installation.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/offsprout-page-builder/admin/importer/class-offsprout-importer.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Offsprout_Model' not found in wp-content/plugins/offsprout-page-builder/includes/class-offsprout-wp-toolbar.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: drag and drop, website builder, offsprout, landing page, front end builder...

offsprout-page-builder/offsprout.php 92% from 13 tests

The entry point to "Offsprout Page Builder" version 2.15.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("offsprout-page-builder.php" instead of "offsprout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin198,373 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15431,80733,183149,859
CSS383,86173633,585
PHP422,3191,9447,667
SVG11703,775
XML428643,469
HTML20016
Markdown1102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity47.79
▷ Minimum class complexity1.00
▷ Maximum class complexity376.00
Average method complexity4.87
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes721.88%
Methods396
▷ Static methods19248.48%
▷ Public methods38797.73%
▷ Protected methods10.25%
▷ Private methods82.02%
Functions15
▷ Named functions853.33%
▷ Anonymous functions746.67%
Constants18
▷ Global constants18100.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
16 PNG files occupy 2.46MB with 1.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/stock/logo-2.png2.65KB1.92KB▼ 27.39%
library/stock/restaurant-logo.png161.16KB41.44KB▼ 74.29%
library/stock/ebook-cover-blank.png42.58KB16.65KB▼ 60.89%
library/stock/logo-7.png3.06KB2.05KB▼ 32.89%
library/stock/law-firm-logo.png102.44KB31.06KB▼ 69.68%