82% share-line-button

Code Review | Share Line

WordPress plugin Share Line scored 82% from 54 tests.

About plugin

  • Plugin page: share-line-button
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 5.8.1
  • First release: Jul 2, 2015
  • Latest release: Jul 2, 2015
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: oxygenyoyo2 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 5,143 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼140.12ms] Passed 4 tests

An overview of server-side resources used by Share Line
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.44 ▲13.88
Dashboard /wp-admin3.07 ▲0.0145.45 ▲0.79
Posts /wp-admin/edit.php3.12 ▲0.0144.73 ▼0.85
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.45 ▼552.32
Media Library /wp-admin/upload.php3.01 ▲0.0030.50 ▼8.08
Share Line /wp-admin/options-general.php?page=share_line_plugin2.9631.16

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Share Line
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲4915.79 ▲0.259.57 ▼1.1749.66 ▲2.64
Dashboard /wp-admin2,974 ▲465.85 ▼0.31137.17 ▼1.14115.62 ▲4.70
Posts /wp-admin/edit.php2,746 ▲72.70 ▼0.0164.46 ▲4.6187.38 ▼7.90
Add New Post /wp-admin/post-new.php1,677 ▼518.87 ▼0.12376.82 ▼4.20104.05 ▼13.35
Media Library /wp-admin/upload.php1,820 ▲105.01 ▼0.03147.69 ▼18.99122.95 ▼6.25
Share Line /wp-admin/options-general.php?page=share_line_plugin1,1912.1049.6877.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=share_line_plugin
    • > Notice in wp-content/plugins/share-line-button/share-line.php+112
    Trying to access array offset on value of type bool

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/share-line-button/views/index.php
    • > /wp-content/plugins/share-line-button/trunk/views/index.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-line-button/trunk/share-line.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-line-button/share-line.php:22

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

readme.txt 94% 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 need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === share-line-button === )
You can look at the official readme.txt

share-line-button/share-line.php 85% from 13 tests

"Share Line" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("share-line-button.php" instead of "share-line.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected135 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24627124
CSS12011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions14
▷ Named functions14100.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
14 PNG files occupy 0.26MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/images/linebutton_36x60_en.png3.33KB2.12KB▼ 36.41%
assets/screenshot-2.png43.39KB10.57KB▼ 75.65%
trunk/assets/screenshot-1.png77.45KB19.45KB▼ 74.89%
trunk/images/linebutton_20x20_en.png1.18KB0.83KB▼ 29.61%
images/linebutton_36x60_en.png3.33KB2.12KB▼ 36.41%