10% mediashare-imageembedtext

Code Review | Plugin Name: MediaShare-Share Button On Image,Embed.

WordPress plugin Plugin Name: MediaShare-Share Button On Image,Embed.scored 10% from 54 tests.

About plugin

  • Plugin page: mediashare-imagee...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 5, 2014
  • Latest release: Nov 5, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: himanshudix2009cool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 871 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/mediashare-imageembedtext/wordpress.php+138
    Undefined variable: style

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.62ms] Passed 4 tests

Analyzing server-side resources used by Plugin Name: MediaShare-Share Button On Image,Embed.
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.62 ▼36.47
Dashboard /wp-admin2.08 ▼1.225.98 ▼41.88
Posts /wp-admin/edit.php2.08 ▼1.275.60 ▼39.64
Add New Post /wp-admin/post-new.php2.08 ▼3.805.59 ▼88.48
Media Library /wp-admin/upload.php2.08 ▼1.147.18 ▼28.30

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: MediaShare-Share Button On Image,Embed.
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲18613.56 ▼0.825.00 ▲3.1639.30 ▼4.79
Dashboard /wp-admin2,224 ▲395.87 ▼0.0296.37 ▼4.9576.53 ▲31.81
Posts /wp-admin/edit.php2,110 ▲211.99 ▼0.0639.13 ▲4.3634.53 ▼1.58
Add New Post /wp-admin/post-new.php1,690 ▲16924.69 ▲1.33699.55 ▼14.9949.64 ▼10.27
Media Library /wp-admin/upload.php1,400 ▲124.26 ▼0.00136.12 ▲27.1349.07 ▲3.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/mediashare-imageembedtext/wordpress.php+138
    Undefined variable: style
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mediashare-imageembedtext/wordpress.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: MediaShare-Share Button On Image,Embed.=== )
  • Screenshots: These screenshots do not have images: #1 (style 1.jpg), #2 (style 2.jpg), #3 (style 3.jpg)
You can take inspiration from this readme.txt

mediashare-imageembedtext/wordpress.php 92% from 13 tests

Analyzing the main PHP file in "Plugin Name: MediaShare-Share Button On Image,Embed." version 1.00
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mediashare-imageembedtext.php" instead of "wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin137 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13911102
CSS19034
JavaScript1191

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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.11MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.86KB1.61KB▼ 13.69%
style1/this.png114.66KB34.08KB▼ 70.27%