72% e-mailit

Code Review | WordPress Share Buttons Plugin – E-MAILiT

WordPress plugin WordPress Share Buttons Plugin – E-MAILiT scored72%from 54 tests.

About plugin

  • Plugin page: e-mailit
  • Plugin version: 12.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 13, 2013
  • Latest release: Jul 17, 2023
  • Number of updates: 2,154
  • Update frequency: every 1.8 days
  • Top authors: e-mailit (100%)

Code review

54 tests

User reviews

64 reviews

Install metrics

1,000+ active /343,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼15.50ms] Passed 4 tests

Analyzing server-side resources used by WordPress Share Buttons Plugin – E-MAILiT
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1533.11 ▼11.00
Dashboard /wp-admin3.55 ▲0.2559.87 ▲2.41
Posts /wp-admin/edit.php3.66 ▲0.3155.40 ▼2.93
Add New Post /wp-admin/post-new.php4.84 ▼1.0545.67 ▼50.49
Media Library /wp-admin/upload.php3.47 ▲0.2444.72 ▲7.64

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
emailit_version
widget_recent-posts
emailit_options
widget_emailitwidget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Share Buttons Plugin – E-MAILiT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,288 ▲52716.68 ▲2.3394.64 ▲92.7644.85 ▲1.30
Dashboard /wp-admin2,207 ▲275.55 ▼0.2882.39 ▼16.5840.58 ▼4.24
Posts /wp-admin/edit.php2,112 ▲92.01 ▲0.0135.98 ▼1.7233.81 ▼3.54
Add New Post /wp-admin/post-new.php6,233 ▲4,69525.84 ▲2.75936.23 ▲277.6566.24 ▲13.78
Media Library /wp-admin/upload.php1,412 ▲124.12 ▼0.08114.12 ▲8.3248.80 ▲2.43
E-MAILiT Share /wp-admin/emailit_admin_panel.php260.420.1113.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_emailitwidget
    • widget_theysaidso_widget
    • emailit_version
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • emailit_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/e-mailit/include/emailit_options.php
    • > /wp-content/plugins/e-mailit/include/emailit_admin_panel.php
    • > /wp-content/plugins/e-mailit/emailit_widget.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/e-mailit/emailit_post_metabox.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/e-mailit/emailit_sidebar_widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/emailit_admin_panel.php
    • > Network (severe)
    wp-admin/emailit_admin_panel.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

e-mailit/emailit_widget.php 85% from 13 tests

Analyzing the main PHP file in "WordPress Share Buttons Plugin – E-MAILiT" version 12.0.3
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("e-mailit.php" instead of "emailit_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,847 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,5501,6036,690
CSS412101,827
PHP5103441,330

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity7.50
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
images/logo.png1.45KB0.57KB▼ 60.96%
css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%