83% lightning-fast-buttons

Code Review | Lightning Fast Social Media Buttons

WordPress plugin Lightning Fast Social Media Buttons scored83%from 54 tests.

About plugin

  • Plugin page: lightning-fast-bu...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Jun 30, 2016
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: xfiveco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /606 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.94ms] Passed 4 tests

Analyzing server-side resources used by Lightning Fast Social Media Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.0739.67 ▼5.27
Dashboard /wp-admin3.65 ▲0.0249.67 ▼18.23
Posts /wp-admin/edit.php3.77 ▲0.0956.13 ▼0.93
Add New Post /wp-admin/post-new.php6.23 ▲0.0990.97 ▼5.87
Media Library /wp-admin/upload.php3.58 ▲0.0936.44 ▼2.40

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Lightning Fast Social Media Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4414.26 ▼0.101.99 ▼0.2237.90 ▼7.40
Dashboard /wp-admin2,217 ▲525.65 ▼0.0495.90 ▼8.1242.99 ▼1.34
Posts /wp-admin/edit.php2,119 ▲222.01 ▼0.0239.43 ▲3.9435.51 ▼1.01
Add New Post /wp-admin/post-new.php1,565 ▲3923.28 ▲5.53664.87 ▼19.4062.76 ▲7.30
Media Library /wp-admin/upload.php1,416 ▲164.25 ▼0.02104.15 ▲5.2942.75 ▼1.39

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lightning-fast-buttons/lightning-fast-social-media-buttons.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === lightning-fast-buttons === )
You can take inspiration from this readme.txt

lightning-fast-buttons/lightning-fast-social-media-buttons.php 92% from 13 tests

The principal PHP file in "Lightning Fast Social Media Buttons" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lightning-fast-buttons.php" instead of "lightning-fast-social-media-buttons.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
No dangerous file extensions were detected516 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP346101299
PO File23840115
CSS34970
JavaScript29932

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin