93% wp-sharex

Code Review | WP ShareX

WordPress plugin WP ShareX scored 93% from 54 tests.

About plugin

  • Plugin page: wp-sharex
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 5.8.1
  • First release: Mar 12, 2018
  • Latest release: Mar 12, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: joomdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 405 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼144.61ms] Passed 4 tests

An overview of server-side resources used by WP ShareX
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.2035.61 ▲0.43
Dashboard /wp-admin3.26 ▲0.2048.74 ▼0.56
Posts /wp-admin/edit.php3.31 ▲0.2045.39 ▲0.47
Add New Post /wp-admin/post-new.php5.62 ▲0.1986.62 ▼578.45
Media Library /wp-admin/upload.php3.20 ▲0.2032.06 ▲0.15

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 57 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP ShareX
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,746 ▲17416.46 ▲0.8511.35 ▲1.1445.99 ▼2.35
Dashboard /wp-admin2,991 ▲605.97 ▼0.02139.77 ▼23.99134.64 ▲23.36
Posts /wp-admin/edit.php2,775 ▲362.65 ▼0.0672.13 ▲4.4390.65 ▲1.76
Add New Post /wp-admin/post-new.php1,637 ▼4621.47 ▲2.75307.77 ▼70.77107.65 ▼3.42
Media Library /wp-admin/upload.php1,777 ▼335.08 ▲0.04138.31 ▼19.93142.49 ▲25.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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 | 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-sharex/joomdev-wss-functions.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-sharex/joomdev-wss-functions.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Click here to select networks), #2 (Update networks after selecting them.), #3 (Setup plugin and api settings.), #4 (Select any design to display the buttons.), #5 (For mobile)
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-sharex === )
The official readme.txt might help

wp-sharex/joomdev-wp-social-share.php 85% from 13 tests

The main PHP script in "WP ShareX" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 205 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-sharex.php" instead of "joomdev-wp-social-share.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected12,450 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS44482134,685
SVG2002,772
Sass1434341,768
LESS1434441,758
PHP41841611,373
JavaScript222194

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.50
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 1.02MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png186.04KB49.29KB▼ 73.50%
screenshot-5.png186.49KB50.05KB▼ 73.16%
screenshot-3.png252.73KB68.18KB▼ 73.02%
assets/img/curved-arrow-red.png2.30KB1.76KB▼ 23.41%
screenshot-1.png158.30KB44.33KB▼ 72.00%