84% social-share-watermark

Code Review | Social Share Watermark

WordPress plugin Social Share Watermark scored84%from 54 tests.

About plugin

  • Plugin page: social-share-wate...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.0
  • WordPress version: 6.3.1
  • First release: Jun 15, 2021
  • Latest release: Nov 9, 2022
  • Number of updates: 18
  • Update frequency: every 28.5 days
  • Top authors: rashedulhaquerumi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /3,583 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.03MB] [CPU: ▲2.54ms] Passed 4 tests

An overview of server-side resources used by Social Share Watermark
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.12 ▼2.42
Dashboard /wp-admin3.34 ▲0.0350.43 ▲3.94
Posts /wp-admin/edit.php3.46 ▲0.1053.93 ▲7.13
Add New Post /wp-admin/post-new.php5.93 ▲0.05128.92 ▲32.04
Media Library /wp-admin/upload.php3.24 ▲0.0134.64 ▲1.51

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Social Share Watermark
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲24514.79 ▲0.482.03 ▲0.2944.15 ▲3.66
Dashboard /wp-admin2,364 ▲1756.49 ▲1.53129.71 ▲14.9540.39 ▼2.08
Posts /wp-admin/edit.php2,270 ▲1813.32 ▲1.2955.00 ▲14.1135.42 ▲0.42
Add New Post /wp-admin/post-new.php1,529 ▼1317.84 ▼0.39601.54 ▼0.8133.46 ▼21.12
Media Library /wp-admin/upload.php1,406 ▲154.15 ▼0.1280.48 ▼19.2241.68 ▼2.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-share-watermark/social-media-Share-Watermark.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: social share, watermark, social

social-share-watermark/social-media-Share-Watermark.php 92% from 13 tests

The principal PHP file in "Social Share Watermark" v. 2.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-share-watermark.php" instead of "social-media-Share-Watermark.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 plugin367 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP310371285
JavaScript28082

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods685.71%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin