83% share-on-wrauter

Code Review | Share On Wrauter

WordPress plugin Share On Wrauter scored83%from 54 tests.

About plugin

  • Plugin page: share-on-wrauter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Mar 24, 2021
  • Latest release: Mar 24, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ayushranjanrout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.83ms] Passed 4 tests

Server-side resources used by Share On Wrauter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0644.70 ▲6.30
Dashboard /wp-admin3.37 ▲0.0745.95 ▼4.02
Posts /wp-admin/edit.php3.48 ▲0.1352.80 ▲1.90
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.46 ▼7.02
Media Library /wp-admin/upload.php3.29 ▲0.0735.88 ▲1.82

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Share On Wrauter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.73 ▲0.561.86 ▲0.2039.82 ▼5.28
Dashboard /wp-admin2,207 ▲275.55 ▼0.1392.27 ▲2.1768.17 ▲16.43
Posts /wp-admin/edit.php2,121 ▲212.12 ▲0.1437.97 ▼1.9132.41 ▼4.91
Add New Post /wp-admin/post-new.php1,553 ▲2722.96 ▲0.11682.93 ▲1.99147.51 ▲88.25
Media Library /wp-admin/upload.php1,418 ▲184.20 ▼0.0196.30 ▼10.0065.16 ▲19.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-on-wrauter/classes/wrauterwpadmin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/share-on-wrauter/classes/wrauterwp.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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
These attributes need your attention:
  • Requires php: The plugin version is formatted incorrectly
  • Contributors: The plugin contributors field is missing
  • Screenshots: No descriptions were found for these screenshots #1, #2 in share-on-wrauter/assets to your readme.txt
Please take inspiration from this readme.txt

share-on-wrauter/wrauterwp.php 85% from 13 tests

"Share On Wrauter" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("share-on-wrauter.php" instead of "wrauterwp.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,819 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS212371,224
PHP567122385
JavaScript174191
SVG10019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.00
▷ Minimum class complexity11.00
▷ Maximum class complexity31.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1275.00%
▷ Protected methods00.00%
▷ Private methods425.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/share-setup.png3.01KB1.88KB▼ 37.69%
assets/images/icon.png2.77KB1.36KB▼ 51.02%
assets/images/welovez-icon.png1.00KB0.81KB▼ 19.53%
assets/images/wrauterwp.png172.69KB55.78KB▼ 67.70%