74% starbonus-widget

Code Review | Wtyczka StarBonus

WordPress plugin Wtyczka StarBonus scored 74% from 54 tests.

About plugin

  • Plugin page: starbonus-widget
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 5.8.1
  • First release: Apr 9, 2015
  • Latest release: Jun 30, 2015
  • Number of updates: 46
  • Update frequency: every 1.8 days
  • Top authors: starbonusvarya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 667 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼144.01ms] Passed 4 tests

Analyzing server-side resources used by Wtyczka StarBonus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0924.46 ▲1.96
Dashboard /wp-admin3.15 ▲0.0835.83 ▼4.39
Posts /wp-admin/edit.php3.26 ▲0.1532.92 ▲2.43
Add New Post /wp-admin/post-new.php5.51 ▲0.0778.11 ▼576.05
Media Library /wp-admin/upload.php3.09 ▲0.0927.91 ▲3.86

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 401 new files
Database: 1 new table, 11 new options
New tables
wp_starbonus_order_status_config
New WordPress options
starbonus_order_timestamp_limit
starbonus_widget_side
starbonus_expanded
starbonus_skin
starbonus_widget_below
starbonus_shipping_cost
starbonus_open_widget
starbonus_animation
starbonus_url_api
starbonus_show_on_shop
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wtyczka StarBonus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,690 ▲8915.53 ▼0.108.14 ▲0.9375.80 ▲2.51
Dashboard /wp-admin2,953 ▲586.12 ▼0.10114.92 ▼17.11198.21 ▲25.41
Posts /wp-admin/edit.php2,761 ▲243.11 ▼0.1261.39 ▼2.39134.00 ▼8.83
Add New Post /wp-admin/post-new.php3,930 ▲23219.04 ▲2.28447.00 ▲1.86181.21 ▲17.75
Media Library /wp-admin/upload.php1,772 ▲205.74 ▲0.22125.07 ▼10.13207.69 ▲23.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 successfully, leaving 1 table in the database
    • wp_starbonus_order_status_config
  • Zombie WordPress options detected upon uninstall: 11 options
    • starbonus_widget_side
    • starbonus_min_width
    • starbonus_animation
    • starbonus_skin
    • starbonus_widget_below
    • starbonus_open_widget
    • starbonus_order_timestamp_limit
    • starbonus_expanded
    • starbonus_shipping_cost
    • starbonus_url_api
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 296× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Stdlib\\Hydrator\\HydratorInterface' not found in wp-content/plugins/starbonus-widget/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/AggregateHydrator.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'OAuth\\Common\\Exception\\Exception' not found in wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/src/OAuth/OAuth2/Service/Exception/InvalidAccessTypeException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\Stdlib\\StringWrapper\\AbstractStringWrapper' not found in wp-content/plugins/starbonus-widget/vendor/zendframework/zend-stdlib/src/StringWrapper/Native.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/examples/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'OAuth\\OAuth1\\Service\\AbstractService' not found in wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/src/OAuth/OAuth1/Service/Etsy.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/examples/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'OAuth\\Common\\Exception\\Exception' not found in wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/src/OAuth/Common/Http/Exception/TokenResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Stdlib\\Hydrator\\HydratorInterface' not found in wp-content/plugins/starbonus-widget/vendor/zendframework/zend-stdlib/src/Hydrator/Aggregate/AggregateHydrator.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\EventManager\\Event' not found in wp-content/plugins/starbonus-widget/vendor/zendframework/zend-stdlib/Zend/Stdlib/Hydrator/Aggregate/ExtractEvent.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/starbonus-widget/vendor/lusitanian/oauth/tests/Unit/OAuth1/Service/TwitterTest.php:7

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: starbonus, wtyczka, cashback, widget

starbonus-widget/starbonus-widget.php Passed 13 tests

"Wtyczka StarBonus" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
18 characters long description:
Wtyczka StarBonus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin19,846 lines of code in 319 files:
LanguageFilesBlank linesComment linesLines of code
PHP2995,04310,63419,002
JSON700397
Markdown6950290
XML35491
YAML47066

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.27
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces58
Interfaces64
Traits10
Classes253
▷ Abstract classes259.88%
▷ Concrete classes22890.12%
▷ Final classes104.39%
Methods1,829
▷ Static methods894.87%
▷ Public methods1,66390.92%
▷ Protected methods1478.04%
▷ Private methods191.04%
Functions42
▷ Named functions49.52%
▷ Anonymous functions3890.48%
Constants330
▷ Global constants113.33%
▷ Class constants31996.67%
▷ Public constants319100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png0.53KB0.70KB0.00%