84% sunny

Code Review | Sunny

WordPress plugin Sunny scored 84% from 54 tests.

About plugin

  • Plugin page: sunny
  • Plugin version: 2.5.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Jan 8, 2018
  • Number of updates: 164
  • Update frequency: every 7.8 days
  • Top authors: tangrufus (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

300+ active / 30,427 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.81MB] [CPU: ▲3.95ms] Passed 4 tests

This is a short check of server-side resources used by Sunny
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5336.96 ▼3.04
Dashboard /wp-admin4.22 ▲0.9251.08 ▲5.98
Posts /wp-admin/edit.php4.27 ▲0.9254.68 ▲6.35
Add New Post /wp-admin/post-new.php6.97 ▲1.0999.36 ▲8.03
Media Library /wp-admin/upload.php4.08 ▲0.8543.21 ▲6.52
Admin Bar /wp-admin/admin.php?page=sunny-admin-bar4.1644.15
Sunny /wp-admin/admin.php?page=sunny-cloudflare4.1840.42
Debuggers /wp-admin/admin.php?page=sunny-debuggers4.1541.03

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sunny
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,657 ▼7813.56 ▼0.811.24 ▼0.8339.58 ▼7.46
Dashboard /wp-admin2,231 ▲435.83 ▼0.0999.53 ▼12.1136.36 ▼8.70
Posts /wp-admin/edit.php2,123 ▲342.05 ▲0.0334.52 ▼7.5733.27 ▼6.17
Add New Post /wp-admin/post-new.php1,567 ▲2018.66 ▲0.56600.59 ▼2.1763.07 ▲10.73
Media Library /wp-admin/upload.php1,413 ▲254.20 ▼0.0499.55 ▼0.7545.05 ▲1.68
Admin Bar /wp-admin/admin.php?page=sunny-admin-bar9872.2939.7237.03
Sunny /wp-admin/admin.php?page=sunny-cloudflare1,0092.2644.9232.08
Debuggers /wp-admin/admin.php?page=sunny-debuggers1,2492.3553.1834.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 101× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Sunny\\Vendor\\TypistTech\\WPBetterSettings\\Decorators\\DecoratorAwareInterface' not found in wp-content/plugins/sunny/vendor/typisttech/wp-better-settings/src/Section.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Sunny\\Vendor\\TypistTech\\WPBetterSettings\\OptionStores\\StrategyInterface' not found in wp-content/plugins/sunny/vendor/typisttech/wp-better-settings/src/OptionStores/ConstantStrategy.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TypistTech\\Sunny\\Vendor\\TypistTech\\WPBetterSettings\\esc_attr() in wp-content/plugins/sunny/vendor/typisttech/wp-better-settings/src/partials/fields/input.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TypistTech\\Sunny\\Vendor\\TypistTech\\WPBetterSettings\\do_action() in wp-content/plugins/sunny/vendor/typisttech/wp-better-settings/src/partials/section.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Sunny\\Targets\\Strategies\\StrategyInterface' not found in wp-content/plugins/sunny/src/Targets/Strategies/Homepage.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Sunny\\LoadableInterface' not found in wp-content/plugins/sunny/src/Debuggers/AbstractDebugger.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sunny/src/Ads/partials/newsletter/newsletter.php:49
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Sunny\\Vendor\\TypistTech\\WPBetterSettings\\Fields\\FieldInterface' not found in wp-content/plugins/sunny/vendor/typisttech/wp-better-settings/src/Fields/AbstractField.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Sunny\\Vendor\\TypistTech\\WPBetterSettings\\OptionStoreInterface' not found in wp-content/plugins/sunny/vendor/typisttech/wp-better-settings/src/OptionStore.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'TypistTech\\Sunny\\Vendor\\League\\Container\\Definition\\AbstractDefinition' not found in wp-content/plugins/sunny/vendor/league/container/src/Definition/CallableDefinition.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6, #7 in sunny/assets to your readme.txt
The official readme.txt is a good inspiration

sunny/sunny.php Passed 13 tests

The main PHP file in "Sunny" ver. 2.5.0 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
Automatically purge CloudFlare cache, including cache everything rules.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin6,524 lines of code in 170 files:
LanguageFilesBlank linesComment linesLines of code
PHP1531,4114,9865,209
JSON800880
JavaScript52670201
CSS22929182
Bourne Again Shell18033
Markdown12019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity2.90
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces43
Interfaces31
Traits6
Classes99
▷ Abstract classes99.09%
▷ Concrete classes9090.91%
▷ Final classes6976.67%
Methods435
▷ Static methods245.52%
▷ Public methods36283.22%
▷ Protected methods347.82%
▷ Private methods398.97%
Functions33
▷ Named functions26.06%
▷ Anonymous functions3193.94%
Constants33
▷ Global constants00.00%
▷ Class constants33100.00%
▷ Public constants33100.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
There are no PNG files in this plugin