72% elementary-addons

Code Review | Elementary Addons

WordPress plugin Elementary Addons scored72%from 54 tests.

About plugin

  • Plugin page: elementary-addons
  • Plugin version: 1.9.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Oct 23, 2023
  • Number of updates: 23
  • Update frequency: every 15.7 days
  • Top authors: camilluskillus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,095 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.56MB] [CPU: ▼4.62ms] Passed 4 tests

A check of server-side resources used by Elementary Addons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5641.65 ▲1.63
Dashboard /wp-admin3.85 ▲0.5548.99 ▲1.32
Posts /wp-admin/edit.php3.97 ▲0.6145.56 ▼2.33
Add New Post /wp-admin/post-new.php6.46 ▲0.5781.29 ▼18.55
Media Library /wp-admin/upload.php3.78 ▲0.5536.58 ▲1.08
Elementary Addons /wp-admin/options-general.php?page=elementary-addons-free-settings3.7737.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Elementary Addons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲20617.04 ▲2.6862.60 ▲61.1048.94 ▲9.31
Dashboard /wp-admin2,222 ▲455.68 ▲0.1494.36 ▲6.7642.44 ▲3.02
Posts /wp-admin/edit.php2,127 ▲302.22 ▲0.2334.37 ▼0.0631.97 ▼9.46
Add New Post /wp-admin/post-new.php1,541 ▲1523.28 ▲0.10663.53 ▲5.4835.92 ▼31.52
Media Library /wp-admin/upload.php1,418 ▲154.29 ▲0.0696.25 ▼7.9545.11 ▲1.10
Elementary Addons /wp-admin/options-general.php?page=elementary-addons-free-settings8991.8027.9925.85

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=elementary-addons-free-settings
    • > Warning in wp-content/plugins/elementary-addons/inc/save_settings_button.php+14
    Use of undefined constant BEA_PLUGIN_DIR_URL - assumed 'BEA_PLUGIN_DIR_URL' (this will throw an Error in a future version of PHP)

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
Please take a closer look at the following
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include(EAFREE_PLUGIN_DIRinc/toggle_switch.php): failed to open stream: No such file or directory in wp-content/plugins/elementary-addons/inc/settings.php on line 3
    • > PHP Warning
      include(EAFREE_PLUGIN_DIRinc/menu_items.php): failed to open stream: No such file or directory in wp-content/plugins/elementary-addons/inc/settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'EAFREE_Get_Settings' not found in wp-content/plugins/elementary-addons/inc/extensions.php:2
    • > PHP Warning
      include(EAFREE_PLUGIN_DIRinc/save_settings_button.php): failed to open stream: No such file or directory in wp-content/plugins/elementary-addons/inc/settings.php on line 4
    • > PHP Warning
      Use of undefined constant EAFREE_PLUGIN_DIR - assumed 'EAFREE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/elementary-addons/inc/settings.php on line 2
    • > PHP Warning
      include(): Failed opening 'EAFREE_PLUGIN_DIRinc/toggle_switch.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/elementary-addons/inc/settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'EAFREE_Get_Settings' not found in wp-content/plugins/elementary-addons/inc/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/elementary-addons/inc/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElementaryAddons\\add_action() in wp-content/plugins/elementary-addons/class-elementary-addons-init.php:58
    • > PHP Fatal error
      Uncaught Error: Class 'EAFREE_Get_Settings' not found in wp-content/plugins/elementary-addons/inc/general_settings.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=elementary-addons-free-settings
    • > Network (severe)
    http://bea_plugin_dir_urlassets/images/ripple.gif - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=elementary-addons-free-settings
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration Passed 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: extensions, elementor, widgets, addons

elementary-addons/elementary-addons.php Passed 13 tests

The entry point to "Elementary Addons" version 1.9.3 is a PHP file that has certain tags in its header comment area
46 characters long description:
Elementary Addons and Extensions for Elementor

Code Analysis 97% from 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
No dangerous file extensions were detected12,430 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,1513038,221
JavaScript99106132,619
CSS37618809
PO File1372485771
SVG12110

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 147)
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity18.47
▷ Minimum class complexity1.00
▷ Maximum class complexity160.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity147.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods101
▷ Static methods1413.86%
▷ Public methods8180.20%
▷ Protected methods1716.83%
▷ Private methods32.97%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png15.11KB5.70KB▼ 62.28%