94% share-target

Code Review | Share Target

WordPress plugin Share Target scored 94% from 54 tests.

About plugin

  • Plugin page: share-target
  • Plugin version: 1.0.0-beta.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 5.8.1
  • First release: Apr 6, 2021
  • Latest release: Apr 6, 2021
  • Number of updates: 4
  • Update frequency: every 3.2 days
  • Top authors: flixos90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 177 total downloads

Benchmarks

Plugin footprint Passed 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.06MB] [CPU: ▼147.69ms] Passed 4 tests

An overview of server-side resources used by Share Target
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1636.43 ▲12.29
Dashboard /wp-admin3.11 ▲0.0547.38 ▼5.34
Posts /wp-admin/edit.php3.22 ▲0.1144.68 ▼4.43
Add New Post /wp-admin/post-new.php5.47 ▲0.0391.88 ▼579.27
Media Library /wp-admin/upload.php3.05 ▲0.0532.85 ▼1.71

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Share Target
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,718 ▲12215.79 ▼0.207.94 ▼2.1048.87 ▼4.06
Dashboard /wp-admin2,985 ▲545.89 ▼0.20143.13 ▼0.98108.79 ▼4.43
Posts /wp-admin/edit.php2,756 ▲172.68 ▲0.0069.16 ▲0.2797.92 ▲3.69
Add New Post /wp-admin/post-new.php1,681 ▼218.88 ▲0.08372.41 ▼12.77123.97 ▲10.39
Media Library /wp-admin/upload.php1,822 ▲125.02 ▲0.00172.53 ▲6.38127.07 ▲0.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_Share_Target\\Registerable' not found in wp-content/plugins/share-target/inc/Plugin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/share-target/share-target.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_Share_Target\\Registerable' not found in wp-content/plugins/share-target/inc/Web_App_Manifest.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_Share_Target\\Registerable' not found in wp-content/plugins/share-target/inc/Service_Worker.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_Share_Target\\Registerable' not found in wp-content/plugins/share-target/inc/Editor.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: web, sharing, api, progressive, image...

share-target/share-target.php 92% from 13 tests

The main file in "Share Target" v. 1.0.0-beta.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1.0.0-beta.1")

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
Good job! No executable or dangerous file extensions detected251 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP859285249
JavaScript2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.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
No PNG images were found in this plugin