84% social-flyer

Code Review | Social Flyer

WordPress plugin Social Flyer scored84%from 54 tests.

About plugin

  • Plugin page: social-flyer
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Nov 5, 2015
  • Number of updates: 14
  • Update frequency: every 4.7 days
  • Top authors: wptowncenter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼0.27ms] Passed 4 tests

An overview of server-side resources used by Social Flyer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.76 ▼1.18
Dashboard /wp-admin3.52 ▲0.2152.77 ▼3.16
Posts /wp-admin/edit.php3.63 ▲0.2760.26 ▲10.04
Add New Post /wp-admin/post-new.php6.09 ▲0.2096.02 ▼1.97
Media Library /wp-admin/upload.php3.41 ▲0.1840.32 ▲5.22
Social Follow Flyer /wp-admin/options-general.php?page=followshape3.5738.00

Server storage [IO: ▲0.91MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 127 new options
New WordPress options
sh_color
sf_each_color_hvr3
sf_enable_ttip_hover1
sf_social_font_size8
sf_enable_ttip_hover3
sfsocial_each_color6
widget_recent-posts
sf_enable_ttip_hover6
sf_enable_ttip_msg2
sfsocial_lable2
...

Browser metrics Passed 4 tests

Checking browser requirements for Social Flyer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,267 ▲50615.49 ▲1.2711.36 ▲9.5542.58 ▼1.85
Dashboard /wp-admin2,380 ▲2006.76 ▲1.19120.90 ▲29.3838.68 ▼1.32
Posts /wp-admin/edit.php2,305 ▲2053.45 ▲1.4549.47 ▲12.8332.03 ▼7.14
Add New Post /wp-admin/post-new.php1,563 ▲3523.57 ▲0.62633.95 ▲31.8737.32 ▼10.56
Media Library /wp-admin/upload.php1,445 ▲454.70 ▲0.4981.09 ▼23.3241.07 ▼3.26
Social Follow Flyer /wp-admin/options-general.php?page=followshape1,1773.8451.0773.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 127 options
    • sfsocial_net_show3
    • sf_main_font_size
    • sf_size
    • sf_social_font_color7
    • sf_social_font_color3
    • sf_enable_border_hover7
    • sf_scoial_icon_fa1
    • sf_easing_type
    • sfsocial_each_color3
    • sf_main_text
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/shape2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/shape6.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/shape3.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/responsive-css.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/adminui.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/social-flyer/inc/flyerprocess.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/shape4.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-flyer/socialflyer.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/shape7.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-flyer/inc/shape5.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

social-flyer/socialflyer.php 92% from 13 tests

"Social Flyer" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-flyer.php" instead of "socialflyer.php")

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
Good job! No executable or dangerous file extensions detected4,462 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP122971072,731
CSS439561,112
SVG100414
JavaScript63731205

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/opt/lc.png3.25KB0.41KB▼ 87.26%
images/opt/rb.png3.27KB0.47KB▼ 85.49%
images/opt/bc.png3.23KB0.41KB▼ 87.30%
images/opt/lt.png3.30KB0.50KB▼ 84.87%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%