10% eelv-share-post

Code Review | Share Post

WordPress plugin Share Post scored10%from 54 tests.

About plugin

  • Plugin page: eelv-share-post
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Dec 22, 2021
  • Number of updates: 46
  • Update frequency: every 72.4 days
  • Top authors: bastho (73.91%)ecolosites (21.74%)n4thaniel (8.7%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,061 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/eelv-share-post/share.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; EELV_Share_Posts has a deprecated constructor

Server metrics [RAM: ▼0.68MB] [CPU: ▼19.31ms] Passed 4 tests

Analyzing server-side resources used by Share Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.81 ▲0.03
Dashboard /wp-admin3.33 ▼0.0145.31 ▼14.76
Posts /wp-admin/edit.php3.38 ▲0.0342.70 ▼2.75
Add New Post /wp-admin/post-new.php3.12 ▼2.7731.38 ▼59.76
Media Library /wp-admin/upload.php3.25 ▲0.0336.32 ▲3.69
Post sharing /wp-admin/options-general.php?page=eelv_share_configuration3.2029.39

Server storage [IO: ▲0.07MB] [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: 13 new files
Database: 1 new table, 6 new options
New tables
wp_share_posts
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Share Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.53 ▼1.209.41 ▲7.8443.64 ▲7.54
Dashboard /wp-admin2,244 ▲645.60 ▼0.0383.21 ▼16.5635.60 ▼9.48
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0137.36 ▼3.6032.10 ▼5.24
Add New Post /wp-admin/post-new.php6,231 ▲4,70525.82 ▲2.38861.85 ▲196.3861.81 ▼4.47
Media Library /wp-admin/upload.php1,413 ▲104.26 ▲0.1295.40 ▼8.0544.50 ▼5.87
Post sharing /wp-admin/options-general.php?page=eelv_share_configuration9321.6922.8925.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_share_posts
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=eelv_share_configuration
    • > Notice in wp-content/plugins/eelv-share-post/admin.php+8
    Undefined index: type
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=eelv_share_configuration
    • > Notice in wp-content/plugins/eelv-share-post/admin.php+87
    Trying to access array offset on value of type bool

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eelv-share-post/share.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eelv-share-post/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Suggested post on the dashboard), #2 (Share button in the toolbar), #3 (Embeded link)
  • Donate link: Invalid URI ("")
The official readme.txt might help

eelv-share-post/share.php 85% from 13 tests

The primary PHP file in "Share Post" version 1.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("eelv-share-post.php" instead of "share.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
There were no executable files found in this plugin1,417 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP41232071,058
SVG111252
CSS23673
JavaScript30023
SQL11411

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity67.00
▷ Minimum class complexity21.00
▷ Maximum class complexity113.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods2970.73%
▷ Protected methods00.00%
▷ Private methods1229.27%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected