84% rusty-image-share

Code Review | Rusty Social Image Share

WordPress plugin Rusty Social Image Share scored 84% from 54 tests.

About plugin

  • Plugin page: rusty-image-share
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.4
  • WordPress version: 6.3.1
  • First release: Apr 8, 2020
  • Latest release: Apr 8, 2020
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: RustyBadRobot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Rusty Social Image Share
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.36 ▼0.63
Dashboard /wp-admin3.32 ▲0.0143.46 ▼1.45
Posts /wp-admin/edit.php3.37 ▲0.0146.84 ▲0.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.43 ▼2.43
Media Library /wp-admin/upload.php3.24 ▲0.0135.37 ▲3.85
Rusty Image Share /wp-admin/tools.php?page=rusty-fb-share3.2130.69

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Rusty Social Image Share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.123.90 ▲1.4439.76 ▼9.97
Dashboard /wp-admin2,210 ▲195.90 ▲1.02105.53 ▲1.0140.97 ▼5.30
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0238.15 ▲3.4634.36 ▲1.86
Add New Post /wp-admin/post-new.php1,540 ▲623.32 ▲0.19587.07 ▼78.1853.81 ▼1.57
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0397.66 ▼0.2341.57 ▼2.59
Rusty Image Share /wp-admin/tools.php?page=rusty-fb-share9332.3540.5826.85

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rusty-image-share/rusty-image-share.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Select the background for your share image within the Tools Menu), #2 (The plugin at work sharing your post thumbnail to Facebook)
You can look at the official readme.txt

rusty-image-share/rusty-image-share.php Passed 13 tests

The main PHP script in "Rusty Social Image Share" version 1.0 is automatically included on every request by WordPress
73 characters long description:
Keep your original Featured Image proportions whilst sharing to Facebook.

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
Success! There were no dangerous files found in this plugin187 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP29538176
CSS1106
JavaScript1205

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png25.22KB10.54KB▼ 58.21%
screenshot-1.png27.78KB10.66KB▼ 61.62%