83% better-follow-button-for-jetpack

Code Review | Better Follow Button for Jetpack

WordPress plugin Better Follow Button for Jetpack scored83%from 54 tests.

About plugin

  • Plugin page: better-follow-but...
  • Plugin version: 8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8
  • WordPress version: 6.3.1
  • First release: Apr 9, 2015
  • Latest release: Jul 29, 2017
  • Number of updates: 20
  • Update frequency: every 42.1 days
  • Top authors: antonpug (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /10,296 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.79ms] Passed 4 tests

Analyzing server-side resources used by Better Follow Button for Jetpack
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0947.83 ▲4.76
Dashboard /wp-admin3.41 ▲0.0652.17 ▼13.70
Posts /wp-admin/edit.php3.46 ▲0.1054.42 ▲4.33
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.33 ▼22.02
Media Library /wp-admin/upload.php3.33 ▲0.1041.17 ▲4.22

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Better Follow Button for Jetpack
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12114.35 ▲0.142.34 ▲0.7195.24 ▲54.74
Dashboard /wp-admin2,214 ▲375.57 ▼0.04110.64 ▲15.1151.37 ▲7.38
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0140.52 ▲2.1838.42 ▼2.63
Add New Post /wp-admin/post-new.php1,538 ▲223.06 ▼0.16643.06 ▼71.0965.50 ▲18.70
Media Library /wp-admin/upload.php1,413 ▲164.25 ▲0.04102.34 ▼9.3643.21 ▼3.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
Good news, no errors were detected

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 fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-follow-button-for-jetpack/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/better-follow-button-for-jetpack/better_follow_button_for_jetpack.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots do not have images: #1 (Collapsed), #2 (Open), #3 (Powerful Settings Options)
Please take inspiration from this readme.txt

better-follow-button-for-jetpack/better_follow_button_for_jetpack.php 92% from 13 tests

Analyzing the main PHP file in "Better Follow Button for Jetpack" version 8.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("better-follow-button-for-jetpack.php" instead of "better_follow_button_for_jetpack.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin770 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28768770

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.56MB with 0.39MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png222.70KB70.88KB▼ 68.17%
screenshot-3.png122.19KB34.86KB▼ 71.47%
plus.png1.07KB0.27KB▼ 74.54%
screenshot-1.png222.84KB71.05KB▼ 68.12%