74% share-on-xing

Code Review | XING for WordPress

WordPress plugin XING for WordPress scored74%from 54 tests.

About plugin

  • Plugin page: share-on-xing
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Apr 17, 2015
  • Number of updates: 56
  • Update frequency: every 3.8 days
  • Top authors: gastonsalg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,781 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.53MB] [CPU: ▼51.93ms] Passed 4 tests

An overview of server-side resources used by XING for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.16 ▼5.35
Dashboard /wp-admin2.43 ▼0.9211.29 ▼47.91
Posts /wp-admin/edit.php2.43 ▼0.939.76 ▼38.35
Add New Post /wp-admin/post-new.php2.43 ▼3.4610.49 ▼97.04
Media Library /wp-admin/upload.php2.43 ▼0.8011.10 ▼24.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_xing-follow
can_compress_scripts
widget_theysaidso_widget
widget_xing-share
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for XING for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10313.31 ▼1.093.91 ▲1.9744.06 ▲1.99
Dashboard /wp-admin2,253 ▲684.85 ▼0.0699.48 ▼1.3135.86 ▼8.38
Posts /wp-admin/edit.php2,132 ▲432.00 ▼0.0142.09 ▲4.6634.76 ▲1.09
Add New Post /wp-admin/post-new.php1,551 ▲2323.16 ▲5.03620.01 ▲26.4260.73 ▲0.79
Media Library /wp-admin/upload.php1,429 ▲414.26 ▲0.0795.14 ▼6.3540.96 ▼4.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/share-on-xing/share-on-xing.php+40
    Non-static method XING_Share_Settings::init() should not be called statically
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_xing-share
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_xing-follow
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/share-on-xing/plugin/xing-share-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-on-xing/share-on-xing.php:114
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/share-on-xing/plugin/xing-follow-widget.php:3

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

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • License uri: Invalid url: "license.txt"
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

share-on-xing/share-on-xing.php Passed 13 tests

"XING for WordPress" version 1.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
120 characters long description:
A plugin that allows you to easily integrate the XING Share button and the Follow button on any WordPress based website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin846 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1023777759
CSS216068
JavaScript13019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.29
▷ Minimum class complexity3.00
▷ Maximum class complexity29.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods4994.23%
▷ Protected methods00.00%
▷ Private methods35.77%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/img/xing_share_layouts.png3.03KB3.23KB0.00%