90% sharing-image

Code Review | Sharing Image

WordPress plugin Sharing Image scored90%from 54 tests.

About plugin

  • Plugin page: sharing-image
  • Plugin version: 2.0.16
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2021
  • Latest release: May 25, 2023
  • Number of updates: 19
  • Update frequency: every 29.9 days
  • Top authors: antonlukin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /4,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.52MB] [CPU: ▲1.16ms] Passed 4 tests

A check of server-side resources used by Sharing Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5344.18 ▼2.17
Dashboard /wp-admin3.85 ▲0.5547.54 ▼1.02
Posts /wp-admin/edit.php3.90 ▲0.5550.99 ▲2.89
Add New Post /wp-admin/post-new.php6.40 ▲0.5199.65 ▲8.24
Media Library /wp-admin/upload.php3.71 ▲0.4839.70 ▲4.94
Sharing Image /wp-admin/options-general.php?page=sharing-image3.7141.73

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sharing Image
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.24 ▼1.351.98 ▲0.1640.09 ▼3.97
Dashboard /wp-admin2,210 ▲254.84 ▼0.97109.26 ▲9.1342.37 ▲1.80
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0639.55 ▲3.8035.32 ▲0.38
Add New Post /wp-admin/post-new.php6,297 ▲4,78319.31 ▲1.89836.42 ▲150.9257.05 ▼5.97
Media Library /wp-admin/upload.php1,395 ▲104.19 ▼0.0198.77 ▼20.0541.79 ▼6.90
Sharing Image /wp-admin/options-general.php?page=sharing-image9793.4342.9431.97

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: telegram, twitter, vkcom, twitter image, facebook...

sharing-image/sharing-image.php Passed 13 tests

The main file in "Sharing Image" v. 2.0.16 serves as a complement to information provided in readme.txt and as the entry point to the plugin
77 characters long description:
Create sharing image for Facebook, VK.com, Telegram and other social networks

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
Everything looks great! No dangerous files found in this plugin10,224 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,0889875,201
PHP229961,8252,970
CSS2201,294
JSON200443
Markdown1570303
XML10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity48.22
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods183
▷ Static methods1910.38%
▷ Public methods12467.76%
▷ Protected methods1910.38%
▷ Private methods4021.86%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin