84% social-subscribe-follow-buttons

Code Review | Social Subscribe - Follow Buttons

WordPress plugin Social Subscribe - Follow Buttons scored84%from 54 tests.

About plugin

  • Plugin page: social-subscribe-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: May 6, 2021
  • Latest release: May 6, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: nhrrob (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /394 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Social Subscribe - Follow Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0338.69 ▼4.61
Dashboard /wp-admin3.38 ▼0.0150.76 ▼15.40
Posts /wp-admin/edit.php3.44 ▲0.0354.45 ▲5.09
Add New Post /wp-admin/post-new.php5.97 ▲0.03100.62 ▲0.05
Media Library /wp-admin/upload.php3.31 ▲0.0341.20 ▲4.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_subscribefollowbuttons_widget
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Social Subscribe - Follow Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.48 ▲1.256.64 ▲2.2437.51 ▼8.10
Dashboard /wp-admin2,195 ▲155.53 ▼0.1489.02 ▼7.0139.56 ▲0.37
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0239.20 ▼4.5935.20 ▼0.27
Add New Post /wp-admin/post-new.php1,526 ▼023.77 ▲0.75677.51 ▲28.2955.55 ▼1.47
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.00109.85 ▲10.3648.20 ▲5.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_subscribefollowbuttons_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-subscribe-follow-buttons/includes/subscribefollow-scripts.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-subscribe-follow-buttons/includes/subscribefollow-class.php:6

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: follow button, subscribe button

social-subscribe-follow-buttons/subscribefollowbuttons.php 92% from 13 tests

This is the main PHP file of "Social Subscribe - Follow Buttons" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-subscribe-follow-buttons.php" instead of "subscribefollowbuttons.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 detected128 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32145128

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin