78% wesnipp-embed

Code Review | WeSnipp Embed

WordPress plugin WeSnipp Embed scored78%from 54 tests.

About plugin

  • Plugin page: wesnipp-embed
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-8.0
  • WordPress version: 6.3.1
  • First release: Oct 2, 2014
  • Latest release: Oct 2, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: osternaud_clem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by WeSnipp Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.75 ▼1.80
Dashboard /wp-admin3.33 ▲0.0248.52 ▲1.17
Posts /wp-admin/edit.php3.38 ▲0.0252.81 ▲1.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.60 ▼7.97
Media Library /wp-admin/upload.php3.25 ▲0.0237.72 ▲1.18

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WeSnipp Embed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.17 ▼0.411.97 ▲0.3144.13 ▲1.56
Dashboard /wp-admin2,198 ▲215.62 ▼0.0490.30 ▼1.4239.52 ▼2.96
Posts /wp-admin/edit.php2,106 ▲61.95 ▼0.0641.44 ▲0.3336.14 ▼3.30
Add New Post /wp-admin/post-new.php1,534 ▲623.06 ▼0.02680.19 ▲67.5848.54 ▲1.54
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.07100.18 ▼7.1543.34 ▲1.49

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wesnipp-embed/tinymce/wesnipp-popup-form.php
    • > /wp-content/plugins/wesnipp-embed/includes/wesnipp_shortcode.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wesnipp-embed/wesnipp-embed.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wesnipp-embed/includes/cpe_i18n_init.php:3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wesnipp-embed/wesnipp-embed.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (A WeSnipp Snippet), #2 (Add a snippet button)
Please take inspiration from this readme.txt

wesnipp-embed/wesnipp-embed.php Passed 13 tests

This is the main PHP file of "WeSnipp Embed" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
52 characters long description:
Easily Include WeSnipp Embeds on your WordPress Blog

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
No dangerous file extensions were detected308 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP66153142
CSS10087
PO File1161648
JavaScript10231

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinymce/images/wesnipp.png1.82KB1.03KB▼ 43.52%
screenshot-1.png173.17KB51.11KB▼ 70.49%
tinymce/images/logo-green-150.png5.17KB3.27KB▼ 36.72%
screenshot-2.png7.67KB2.17KB▼ 71.65%