84% stackla-simple-embed

Code Review | Stackla Simple Embed

WordPress plugin Stackla Simple Embed scored84%from 54 tests.

About plugin

  • Plugin page: stackla-simple-embed
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Aug 31, 2018
  • Latest release: Dec 13, 2018
  • Number of updates: 10
  • Update frequency: every 10.5 days
  • Top authors: stevenstackla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /751 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.05MB] [CPU: ▲0.02ms] Passed 4 tests

An overview of server-side resources used by Stackla Simple Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0538.24 ▼2.29
Dashboard /wp-admin3.36 ▲0.0544.78 ▼4.96
Posts /wp-admin/edit.php3.47 ▲0.1146.96 ▲4.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.92 ▲5.02
Media Library /wp-admin/upload.php3.28 ▲0.0535.74 ▲2.95

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Stackla Simple Embed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6113.65 ▼0.721.61 ▼0.2939.92 ▼8.65
Dashboard /wp-admin2,221 ▲335.86 ▼0.04111.97 ▼6.3588.99 ▲41.89
Posts /wp-admin/edit.php2,111 ▲222.04 ▲0.0140.49 ▲3.6234.94 ▲1.37
Add New Post /wp-admin/post-new.php1,539 ▲818.27 ▼4.52642.14 ▼14.9155.47 ▼2.07
Media Library /wp-admin/upload.php1,410 ▲224.23 ▲0.03101.52 ▲5.4979.44 ▲37.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/stackla-simple-embed/stackla.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: social, stackla, ugc, widget

stackla-simple-embed/stackla.php 92% from 13 tests

The main file in "Stackla Simple Embed" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stackla-simple-embed.php" instead of "stackla.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected276 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45630276

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.25
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1780.95%
▷ Protected methods00.00%
▷ Private methods419.05%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.51KB0.39KB▼ 73.82%