78% easy-tweet-embed

Code Review | Easy Tweet Embed

WordPress plugin Easy Tweet Embed scored78%from 54 tests.

About plugin

  • Plugin page: easy-tweet-embed
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-3.5
  • WordPress version: 6.3.1
  • First release: Jul 13, 2012
  • Latest release: Feb 21, 2013
  • Number of updates: 17
  • Update frequency: every 21.9 days
  • Top authors: titopandub (88.24%)tomewer (17.65%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /5,196 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼27.70ms] Passed 4 tests

Analyzing server-side resources used by Easy Tweet Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.67 ▲5.44
Dashboard /wp-admin3.08 ▼0.2728.88 ▼33.98
Posts /wp-admin/edit.php3.22 ▼0.1435.79 ▼16.28
Add New Post /wp-admin/post-new.php5.46 ▼0.4468.58 ▼46.46
Media Library /wp-admin/upload.php3.16 ▼0.0724.76 ▼14.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Easy Tweet Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.38 ▲0.181.95 ▲0.2643.80 ▲0.21
Dashboard /wp-admin2,199 ▲185.50 ▼0.2188.08 ▼12.7642.55 ▼1.49
Posts /wp-admin/edit.php2,107 ▲72.04 ▲0.0041.92 ▼0.3838.32 ▲2.96
Add New Post /wp-admin/post-new.php1,533 ▲723.23 ▼0.13678.27 ▲28.3953.71 ▼10.37
Media Library /wp-admin/upload.php1,401 ▲14.18 ▲0.0198.57 ▼18.4146.16 ▼1.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-tweet-embed/file.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-tweet-embed/functions.php:72

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The Easy Tweet Embed Button.), #2 (The Easy Tweet Embed box.), #3 (An example of an embedded tweet.), #4 (The end result - what pops up when you click on an embedded tweet.)
  • Plugin Name: Please specify the plugin name on the first line ( === easy-tweet-embed === )
You can take inspiration from this readme.txt

easy-tweet-embed/functions.php 92% from 13 tests

Analyzing the main PHP file in "Easy Tweet Embed" version 1.7
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-tweet-embed.php" instead of "functions.php")

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
There were no executable files found in this plugin1,309 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31991591,071
CSS2111148
PHP2181790

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions7
▷ Named functions7100.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
10 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png28.64KB10.18KB▼ 64.46%
screenshot-2.png49.85KB16.92KB▼ 66.07%
screenshot-3.png34.17KB12.95KB▼ 62.10%
css/images/embedtweet.png2.97KB0.46KB▼ 84.58%
css/images/button-grad.png0.24KB0.24KB0.00%