83% ect-social-share

Code Review | ECT Social Share

WordPress plugin ECT Social Share scored83%from 54 tests.

About plugin

  • Plugin page: ect-social-share
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Dec 7, 2018
  • Number of updates: 20
  • Update frequency: every 104.3 days
  • Top authors: etemplates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,862 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.53ms] Passed 4 tests

This is a short check of server-side resources used by ECT Social Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.31 ▼6.35
Dashboard /wp-admin3.34 ▼0.0145.64 ▼17.87
Posts /wp-admin/edit.php3.39 ▲0.0350.53 ▲4.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.37 ▲2.16
Media Library /wp-admin/upload.php3.26 ▲0.0336.20 ▼0.04

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

Browser metrics Passed 4 tests

A check of browser resources used by ECT Social Share
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8114.27 ▼0.022.01 ▲0.2736.33 ▼6.05
Dashboard /wp-admin2,210 ▲435.57 ▼0.1084.67 ▼28.8773.97 ▲30.36
Posts /wp-admin/edit.php2,115 ▲151.99 ▲0.0133.51 ▼2.4035.33 ▼1.57
Add New Post /wp-admin/post-new.php1,565 ▲3718.56 ▼4.40640.75 ▼42.97110.81 ▲44.48
Media Library /wp-admin/upload.php1,418 ▲154.22 ▲0.0297.45 ▼10.6378.37 ▲31.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ect-social-share/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function escape_string() in wp-content/plugins/ect-social-share/vsadmin/incectsocialshare.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

ect-social-share/index.php 92% from 13 tests

The primary PHP file in "ECT Social Share" version 1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ect-social-share.php" instead of "index.php")

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
There were no executable files found in this plugin272 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21610272

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/fb.png0.49KB0.35KB▼ 28.49%
img/twitter.png1.41KB0.61KB▼ 56.71%
img/delete.png0.15KB0.14KB▼ 4.00%
img/ect28x28.png0.63KB0.58KB▼ 7.59%
img/pinterest.png1.45KB0.61KB▼ 57.65%