89% tembeds

Code Review | TEmbeds

WordPress plugin TEmbeds scored89%from 54 tests.

About plugin

  • Plugin page: tembeds
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Aug 10, 2022
  • Number of updates: 40
  • Update frequency: every 16.0 days
  • Top authors: fourtonfish (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /669 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.38MB] [CPU: ▼4.36ms] Passed 4 tests

Analyzing server-side resources used by TEmbeds
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4041.95 ▼2.64
Dashboard /wp-admin3.71 ▲0.4147.44 ▼4.02
Posts /wp-admin/edit.php3.76 ▲0.4148.70 ▲2.64
Add New Post /wp-admin/post-new.php6.24 ▲0.3583.57 ▼13.40
Media Library /wp-admin/upload.php3.57 ▲0.3537.17 ▲2.96
Tweet Embeds /wp-admin/options-general.php?page=ftf-alt-embed-tweet3.5336.50

Server storage [IO: ▲9.22MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

TEmbeds: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.31 ▼1.062.03 ▲0.1440.09 ▼5.82
Dashboard /wp-admin2,210 ▲224.84 ▼1.0399.09 ▼0.6939.17 ▲3.23
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0739.54 ▼1.4935.54 ▲0.37
Add New Post /wp-admin/post-new.php1,536 ▲323.22 ▲0.12662.14 ▲14.4265.96 ▲8.14
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0195.68 ▲3.4242.32 ▲1.40
Tweet Embeds /wp-admin/options-general.php?page=ftf-alt-embed-tweet1,0092.0524.0030.96

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2 in tembeds/assets to your readme.txt
The official readme.txt is a good inspiration

tembeds/index.php 92% from 13 tests

The entry point to "TEmbeds" version 1.2.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tembeds.php" instead of "index.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
Success! There were no dangerous files found in this plugin22,635 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
JSON20010,148
Sass931,3651,1705,672
CSS43104,206
PHP24563302,227
JavaScript37759349
Markdown117033

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity145.67
▷ Minimum class complexity50.00
▷ Maximum class complexity249.00
Average method complexity5.02
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods108
▷ Static methods10.93%
▷ Public methods9386.11%
▷ Protected methods1513.89%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 4.38MB with 2.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/blog/performance.png143.50KB59.09KB▼ 58.82%
images/blog/test-demo/desktop-on.png142.47KB56.59KB▼ 60.28%
images/thumbnail/tweet-embeds-bw-tint.png382.04KB169.55KB▼ 55.62%
images/assets/banner-772x250.png148.11KB63.37KB▼ 57.21%
images/blog/test-demo/desktop-off.png137.66KB55.68KB▼ 59.55%