84% olivewp-companion

Code Review | OliveWP Companion

WordPress plugin OliveWP Companion scored84%from 54 tests.

About plugin

  • Plugin page: olivewp-companion
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3+
  • WordPress version: 6.3.1
  • First release: Jun 30, 2022
  • Latest release: Sep 13, 2022
  • Number of updates: 7
  • Update frequency: every 14.9 days
  • Top authors: spicethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /8,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.82ms] Passed 4 tests

A check of server-side resources used by OliveWP Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.64 ▲2.07
Dashboard /wp-admin3.34 ▲0.0443.40 ▼4.19
Posts /wp-admin/edit.php3.46 ▲0.1047.46 ▼2.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.21 ▼14.83
Media Library /wp-admin/upload.php3.27 ▲0.0433.23 ▼1.86

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 211 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for OliveWP Companion
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.25 ▼1.121.58 ▼0.2342.24 ▲2.10
Dashboard /wp-admin2,206 ▲185.91 ▲0.91105.48 ▼6.6742.03 ▼0.01
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0141.89 ▲1.0234.58 ▼0.74
Add New Post /wp-admin/post-new.php1,533 ▲423.04 ▲4.62654.25 ▲13.0860.90 ▲0.87
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0697.14 ▲0.5741.70 ▼2.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olivewp-companion/admin/owc-script.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/olivewp-companion/inc/control/customizer-taxonomy-dropdown-custom-control.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olivewp-companion/admin/tab/addons.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olivewp-companion/admin/tab/home-page.php:183
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olivewp-companion/admin/tab/extensions.php:60
    • > PHP Warning
      Use of undefined constant OWC_PLUGIN_DIR - assumed 'OWC_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/olivewp-companion/admin/view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/olivewp-companion/inc/control/customizer-image-checkbox-custom-control.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/olivewp-companion/admin/tab/changelog.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/olivewp-companion/inc/control/customizer-slider/customizer-slider.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/olivewp-companion/inc/spice-starter-sites/demo-content/setup.php:275

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

olivewp-companion/olivewp-companion.php Passed 13 tests

The entry point to "OliveWP Companion" version 1.1.2 is a PHP file that has certain tags in its header comment area
121 characters long description:
OliveWP Companion plugin enhances the functionality of OliveWP theme. This plugin requires OliveWP theme to be installed.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin41,702 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PHP1267,48516,26532,417
JavaScript131,4064806,497
CSS193301492,547
Markdown1680214
JSON10027

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity76.39
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,153
▷ Static methods17515.18%
▷ Public methods81170.34%
▷ Protected methods171.47%
▷ Private methods32528.19%
Functions130
▷ Named functions12898.46%
▷ Anonymous functions21.54%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/freemius/assets/img/olivewp-companion.png3.25KB2.93KB▼ 9.85%
inc/control/assets/img/ipad.png0.33KB0.33KB0.00%
inc/freemius/assets/img/spice-starter-sites-plus.png3.15KB2.85KB▼ 9.48%
inc/freemius/assets/img/olivewp-plus.png3.15KB2.85KB▼ 9.48%
inc/control/assets/img/mobile.png0.38KB0.39KB0.00%