93% embedery-integrate

Code Review | Popups by Embedery - A Modern WordPress Popup Plugin

WordPress plugin Popups by Embedery - A Modern WordPress Popup Plugin scored 93% from 54 tests.

About plugin

  • Plugin page: embedery-integrate
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 5.8.1
  • First release: Feb 19, 2019
  • Latest release: Mar 12, 2020
  • Number of updates: 24
  • Update frequency: every 16.1 days
  • Top authors: embedery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 963 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.51ms] Passed 4 tests

Server-side resources used by Popups by Embedery - A Modern WordPress Popup Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1337.09 ▲14.91
Dashboard /wp-admin3.07 ▲0.0248.96 ▼3.95
Posts /wp-admin/edit.php3.13 ▲0.0247.29 ▲1.34
Add New Post /wp-admin/post-new.php5.43 ▼0.0094.27 ▼565.99
Media Library /wp-admin/upload.php3.02 ▲0.0235.40 ▼1.43

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Popups by Embedery - A Modern WordPress Popup Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,736 ▲14016.18 ▲0.459.65 ▼2.5159.19 ▲8.25
Dashboard /wp-admin3,015 ▲846.73 ▲0.71151.62 ▼8.05125.61 ▲12.20
Posts /wp-admin/edit.php2,812 ▲733.22 ▲0.3872.08 ▼0.0396.75 ▼2.68
Add New Post /wp-admin/post-new.php1,764 ▲18324.36 ▲4.09379.23 ▼37.47140.07 ▲23.45
Media Library /wp-admin/upload.php1,806 ▼15.39 ▲0.37145.21 ▼37.97156.01 ▲29.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/embedery-integrate/admin/partials/embedery-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/embedery-integrate/public/partials/embedery-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/embedery-integrate/trunk/public/partials/embedery-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/embedery-integrate/trunk/admin/partials/embedery-admin-display.php:15

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)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 64 tag instead of maximum 10
  • Screenshots: These screenshots require images: #4 (Tons of templates to get you started.), #5 (Using the shortcode.), #6 (Viewing your widgets from the admin with quick links.), #7 (Viewing your widgets from the admin with quick links.)
You can take inspiration from this readme.txt

embedery-integrate/embedery.php 77% from 13 tests

"Popups by Embedery - A Modern WordPress Popup Plugin" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("embedery-integrate.php" instead of "embedery.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin833 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13177535446
CSS2364234
JavaScript3215139
SVG20014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods60
▷ Static methods46.67%
▷ Public methods4880.00%
▷ Protected methods00.00%
▷ Private methods1220.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 1.01MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/story.png79.20KB23.46KB▼ 70.38%
assets/widget.png395.68KB106.21KB▼ 73.16%
trunk/assets/graph.png41.31KB4.30KB▼ 89.58%
trunk/assets/story.png79.20KB23.46KB▼ 70.38%
trunk/assets/widget.png395.68KB106.21KB▼ 73.16%