79% share-by-email

Code Review | Share by Email

WordPress plugin Share by Email scored79%from 54 tests.

About plugin

  • Plugin page: share-by-email
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 12, 2021
  • Latest release: Apr 11, 2023
  • Number of updates: 8
  • Update frequency: every 100.7 days
  • Top authors: lehelm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.19ms] Passed 4 tests

A check of server-side resources used by Share by Email
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.86 ▼0.40
Dashboard /wp-admin3.55 ▲0.2550.11 ▲1.54
Posts /wp-admin/edit.php3.60 ▲0.2451.51 ▲1.05
Add New Post /wp-admin/post-new.php6.09 ▲0.2088.62 ▼6.94
Media Library /wp-admin/upload.php3.41 ▲0.1837.15 ▲1.59
Share By Email /wp-admin/options-general.php?page=share_by_email_options3.3834.67

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
sbe_settings_general_options
uptime_ghost_options
sbe_settings_email_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Share by Email
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.73 ▼0.915.62 ▲3.7542.89 ▼5.95
Dashboard /wp-admin2,216 ▲345.83 ▼0.04107.17 ▼6.3740.30 ▼3.99
Posts /wp-admin/edit.php2,096 ▲72.01 ▲0.0237.96 ▼3.9332.53 ▼5.16
Add New Post /wp-admin/post-new.php1,523 ▼1023.24 ▼0.09679.09 ▼16.8451.35 ▼0.43
Media Library /wp-admin/upload.php1,401 ▲104.20 ▲0.0698.72 ▼4.2742.44 ▼5.50
Share By Email /wp-admin/options-general.php?page=share_by_email_options9602.0522.3428.94

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/share-by-email/public/partials/share-by-email-public-display.php
    • > /wp-content/plugins/share-by-email/admin/partials/share-by-email-admin-display.php
  • 3× 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/share-by-email/includes/class-share-by-email-admin-shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/share-by-email/wp-lhl-admin-ui/wp-lhl-admin-ui.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/share-by-email/admin/class-share-by-email-plugin-settings.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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: share, send post by email, share by email, email

share-by-email/share-by-email.php Passed 13 tests

The main PHP script in "Share by Email" version 1.0.2 is automatically included on every request by WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,163 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP204671,0611,046
CSS33834109
JavaScript24546
Markdown1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.07
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods70
▷ Static methods1622.86%
▷ Public methods6491.43%
▷ Protected methods00.00%
▷ Private methods68.57%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.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 images were found in this plugin