78% emulsion-addons

Code Review | emulsion addons

WordPress plugin emulsion addons scored78%from 54 tests.

About plugin

  • Plugin page: emulsion-addons
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Apr 8, 2020
  • Latest release: Dec 3, 2023
  • Number of updates: 94
  • Update frequency: every 14.2 days
  • Top authors: nobita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /18,152 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.93ms] Passed 4 tests

Analyzing server-side resources used by emulsion addons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.13 ▼5.93
Dashboard /wp-admin3.31 ▲0.0047.23 ▼3.38
Posts /wp-admin/edit.php3.36 ▲0.0050.97 ▲0.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.05 ▼3.35
Media Library /wp-admin/upload.php3.24 ▲0.0034.03 ▲2.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for emulsion addons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▼0.071.67 ▼0.0442.45 ▼5.45
Dashboard /wp-admin2,195 ▲215.63 ▲0.0285.40 ▼9.7441.17 ▲1.99
Posts /wp-admin/edit.php2,097 ▼02.00 ▼0.0238.75 ▲2.3035.27 ▲4.22
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▲0.11586.51 ▼18.6858.12 ▲3.53
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.0298.16 ▲1.5143.75 ▲2.91

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/emulsion-addons/documents/examples.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/emulsion-addons/emulsion.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function emulsion_get_theme_operation_mode() in wp-content/plugins/emulsion-addons/documents/templatetag.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/emulsion-addons/includes/wp-scss.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function emulsion_get_theme_operation_mode() in wp-content/plugins/emulsion-addons/documents/customizer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/emulsion-addons/includes/functions.php:492
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emulsion-addons/includes/snippets.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emulsion-addons/documents/documents.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/emulsion-addons/documents/homepage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function emulsion_get_theme_operation_mode() in wp-content/plugins/emulsion-addons/documents/embed.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emulsion-addons/includes/hooks.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1.png) image not found
Please take inspiration from this readme.txt

emulsion-addons/emulsion.php 92% from 13 tests

"emulsion addons" version 3.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("emulsion-addons.php" instead of "emulsion.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin13,402 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP242,4261,36111,321
JavaScript22381711,278
CSS25629803

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.50
▷ Minimum class complexity7.00
▷ Maximum class complexity26.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions269
▷ Named functions26397.77%
▷ Anonymous functions62.23%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin