10% flare

Code Review | Flare

WordPress plugin Flare scored10%from 54 tests.

About plugin

  • Plugin page: flare
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2012
  • Latest release: Sep 8, 2016
  • Number of updates: 94
  • Update frequency: every 16.1 days
  • Top authors: dtelepathy (97.87%)ShareThis (3.19%)

Code review

54 tests

User reviews

46 reviews

Install metrics

1,000+ active /184,816 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/flare/models/button.php+230
    Accessing static property Flare_Model::$namespace as non static

Server metrics [RAM: ▼1.92MB] [CPU: ▼52.49ms] Passed 4 tests

Analyzing server-side resources used by Flare
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.39 ▼32.50
Dashboard /wp-admin2.08 ▼1.225.89 ▼40.78
Posts /wp-admin/edit.php2.08 ▼1.275.43 ▼42.65
Add New Post /wp-admin/post-new.php2.08 ▼3.805.01 ▼94.01
Media Library /wp-admin/upload.php2.08 ▼1.145.62 ▼26.48

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 88 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
ssb_version
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_flare_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Flare
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,041 ▲29513.57 ▼1.078.42 ▲6.7652.90 ▲10.62
Dashboard /wp-admin2,245 ▲575.84 ▲0.7496.51 ▼21.4575.10 ▲28.96
Posts /wp-admin/edit.php2,125 ▲331.99 ▼0.0635.93 ▼2.3135.68 ▼1.20
Add New Post /wp-admin/post-new.php1,567 ▲3918.44 ▲0.09659.01 ▲34.9564.34 ▲8.80
Media Library /wp-admin/upload.php1,421 ▲304.22 ▼0.13101.18 ▲0.0445.62 ▲3.22
Follow /wp-admin/flare.php/follow260.440.1017.71
Metrics /wp-admin/flare.php/metrics260.440.088.40
Share /wp-admin/flare.php260.440.096.38
Get Flare Pro /wp-admin/flare.php/filament260.440.087.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/flare/flare.php+89
    Accessing static property Flare::$namespace as non static
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ssb_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_flare_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/flare/views/widget/widget.php
    • > /wp-content/plugins/flare/views/admin/_follow_button.php
    • > /wp-content/plugins/flare/views/elements/_blog-feed.php
    • > /wp-content/plugins/flare/views/_footer.php
    • > /wp-content/plugins/flare/views/elements/_primary-navigation.php
  • 118× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: namespace in wp-content/plugins/flare/views/share.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flare/views/admin/_follow_button.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flare/views/admin/_button.php on line 9
    • > PHP Notice
      Undefined variable: namespace in wp-content/plugins/flare/views/_footer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/flare/flare.php:662
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flare/views/admin/_button.php on line 34
    • > PHP Notice
      Undefined variable: button in wp-content/plugins/flare/views/admin/_button.php on line 51
    • > PHP Notice
      Undefined variable: available_buttons in wp-content/plugins/flare/views/admin/_button.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flare/views/admin/_button.php on line 1
    • > PHP Notice
      Undefined variable: namespace in wp-content/plugins/flare/views/follow.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/flare.php/follow
    • > Network (severe)
    wp-admin/flare.php/follow - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/flare.php/metrics
    • > Network (severe)
    wp-admin/flare.php/metrics - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/flare.php
    • > Network (severe)
    wp-admin/flare.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/flare.php/filament
    • > Network (severe)
    wp-admin/flare.php/filament - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Choose where you want your Flare bar to appear), #2 (You pick what social media you want to share), #3 (Choose what style of button you want to display), #4 (Customize the color of your buttons), #5 (Drag and drop the order you want your buttons to appear in), #6 (Multiple options available for certain social content), #7 (You can also paste in your own custom code), #8 (New Follow Me widget customization)
  • Tags: There are too many tags (16 tag instead of maximum 10)
Please take inspiration from this readme.txt

flare/flare.php 92% from 13 tests

"Flare" version 1.2.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)

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
Good job! No executable or dangerous file extensions detected5,425 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS597382,223
PHP185096272,097
JavaScript83511641,105

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity54.50
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods56
▷ Static methods58.93%
▷ Public methods5089.29%
▷ Protected methods00.00%
▷ Private methods610.71%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
42 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flare-star.png1.73KB1.04KB▼ 39.56%
images/flyout-arrow-horizontal.ie.png0.97KB0.13KB▼ 86.51%
images/icon-fancy-checkbox.png1.01KB0.17KB▼ 83.41%
images/flyout-arrow-left.png1.13KB0.41KB▼ 63.50%
images/metrics-preview.png29.03KB27.41KB▼ 5.58%