83% emercury-add-on-for-elementor-pro

Code Review | Emercury Add-on for Elementor PRO

WordPress plugin Emercury Add-on for Elementor PRO scored83%from 54 tests.

About plugin

  • Plugin page: emercury-add-on-f...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2020
  • Latest release: Oct 7, 2021
  • Number of updates: 11
  • Update frequency: every 101.1 days
  • Top authors: emercury (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /559 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

An overview of server-side resources used by Emercury Add-on for Elementor PRO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.97 ▼3.10
Dashboard /wp-admin3.31 ▲0.0046.37 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0044.28 ▼2.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.11 ▼8.45
Media Library /wp-admin/upload.php3.23 ▲0.0037.53 ▲1.34

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

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

Browser metrics Passed 4 tests

Emercury Add-on for Elementor PRO: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.091.66 ▼0.6840.45 ▼11.63
Dashboard /wp-admin2,203 ▲155.95 ▲1.05100.91 ▼5.1541.88 ▼2.30
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0434.14 ▼1.5036.89 ▲3.13
Add New Post /wp-admin/post-new.php1,519 ▼1823.24 ▲0.08648.28 ▼15.3857.84 ▲7.72
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0496.06 ▲0.7942.48 ▼0.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 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/emercury-add-on-for-elementor-pro/controller/emercury_module.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Elementor -> Settings -> Integrations.), #2 (You can't use Emercury without filled in API keys.), #3 (Create widget form.), #4 (Select Action after Submit "Emercury".), #5 (Mapping Emercury fields to Form.)
You can take inspiration from this readme.txt

emercury-add-on-for-elementor-pro/elementor-emercury-add-on.php 85% from 13 tests

The main PHP file in "Emercury Add-on for Elementor PRO" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("emercury-add-on-for-elementor-pro.php" instead of "elementor-emercury-add-on.php")
  • Description: The description should be shorter than 140 characters (currently 169 characters long)

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
Good job! No executable or dangerous file extensions detected361 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP48150361

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.27
Average class complexity7.33
▷ Minimum class complexity3.00
▷ Maximum class complexity14.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1571.43%
▷ Protected methods314.29%
▷ Private methods314.29%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.25MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png80.74KB27.12KB▼ 66.41%
screenshot-5.png65.49KB16.89KB▼ 74.20%
screenshot-4.png23.45KB7.36KB▼ 68.59%
screenshot-3.png59.40KB14.21KB▼ 76.08%
screenshot-2.png29.64KB9.68KB▼ 67.32%