89% sierra-addons

Code Review | Sierra Addons

WordPress plugin Sierra Addons scored 89% from 53 tests.

About plugin

  • Plugin page: sierra-addons
  • Plugin version: 1.0.20
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 5.8.1
  • First release: Aug 23, 2018
  • Latest release: Aug 19, 2020
  • Number of updates: 89
  • Update frequency: every 8.2 days
  • Top authors: themesty (100%)

Code review

53 tests

User reviews

1 review

Install metrics

400+ active / 6,103 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼291.15ms] Passed 4 tests

An overview of server-side resources used by Sierra Addons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1438.66 ▲17.96
Dashboard /wp-admin3.08 ▲0.0345.88 ▲1.39
Posts /wp-admin/edit.php3.13 ▲0.0241.61 ▼3.33
Add New Post /wp-admin/post-new.php5.44 ▲0.0194.76 ▼1,154.62
Media Library /wp-admin/upload.php3.03 ▲0.0231.52 ▼8.04

Server storage [IO: ▲1.38MB] [DB: ▲0.62MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 71 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sierra Addons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,675 ▲6915.93 ▲0.059.52 ▲1.7241.77 ▼5.74
Dashboard /wp-admin2,936 ▲835.93 ▲0.09141.05 ▼7.58105.66 ▲5.30
Posts /wp-admin/edit.php2,708 ▲22.68 ▼0.0163.87 ▼1.1892.67 ▲1.99
Add New Post /wp-admin/post-new.php1,655 ▼19618.84 ▲1.36378.30 ▼17.83104.58 ▼3.10
Media Library /wp-admin/upload.php1,718 ▼574.98 ▼0.04146.51 ▼7.37110.47 ▼8.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.62MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 16× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-select-group.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-radio.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-parent.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/section.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-multi-avatars.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-textarea.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-image.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/nav.php
    • > /wp-content/plugins/sierra-addons/inc/butterbean/tmpl/control-color.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/sierra-addons/inc/butterbean/inc/controls/class-control-select-group.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/sierra-addons/inc/butterbean/inc/controls/class-control-image.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/sierra-addons/inc/butterbean/inc/controls/class-control-datetime.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/sierra-addons/inc/butterbean/inc/controls/class-control-color.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sierra-addons/inc/metaboxes.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Setting' not found in wp-content/plugins/sierra-addons/inc/butterbean/inc/settings/class-setting-datetime.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sierra-addons/demo-data/demo-install.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control_Textarea' not found in wp-content/plugins/sierra-addons/inc/butterbean/inc/controls/class-control-excerpt.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sierra-addons/inc/butterbean/butterbean.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sierra-addons/inc/butterbean/class-butterbean.php:144

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: meta box

sierra-addons/sierra-addons.php Passed 13 tests

The entry point to "Sierra Addons" version 1.0.20 is a PHP file that has certain tags in its header comment area
47 characters long description:
Plugin with extra features for WP Sierra theme.

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
No dangerous file extensions were detected11,165 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
XML31261207,692
PHP468682,4492,390
Markdown41260401
CSS48714341
JavaScript3171388341

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.08
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes28.33%
Methods160
▷ Static methods31.88%
▷ Public methods14188.12%
▷ Protected methods85.00%
▷ Private methods116.88%
Functions32
▷ Named functions2887.50%
▷ Anonymous functions412.50%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin