10% efrontpro

Code Review | eFront

WordPress plugin eFront scored10%from 54 tests.

About plugin

  • Plugin page: efrontpro
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.5
  • WordPress version: 6.3.1
  • First release: Jun 12, 2017
  • Latest release: Nov 1, 2018
  • Number of updates: 6
  • Update frequency: every 85.0 days
  • Top authors: epignosis (66.67%)V. (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /849 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/efrontpro/admin/admin.php+159
    Undefined index: ef-domain

Server metrics [RAM: ▼1.81MB] [CPU: ▼59.14ms] Passed 4 tests

Server-side resources used by eFront
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.88 ▼35.94
Dashboard /wp-admin2.19 ▼1.118.08 ▼43.40
Posts /wp-admin/edit.php2.19 ▼1.167.28 ▼50.51
Add New Post /wp-admin/post-new.php2.19 ▼3.698.36 ▼106.72
Media Library /wp-admin/upload.php2.19 ▼1.037.04 ▼29.82
Dashboard /wp-admin/admin.php?page=efrontpro2.196.41
Setup /wp-admin/admin.php?page=efrontpro-setup2.197.36
Integrations /wp-admin/admin.php?page=efrontpro-integrations2.196.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 65 new files
Database: 4 new tables, 15 new options
New tables
wp_efrontpro_product_categories
wp_efrontpro_products
wp_efrontpro_categories
wp_efrontpro_courses
New WordPress options
ef-woocommerce-active
theysaidso_admin_options
ef_signup_page_id
widget_recent-comments
widget_recent-posts
ef_courses_page_id
ef_courses_page_title
widget_theysaidso_widget
ef_courses_page_name
ef-apikey
...

Browser metrics Passed 4 tests

eFront: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5314.37 ▲0.081.86 ▼0.1543.57 ▲0.23
Dashboard /wp-admin2,242 ▲625.69 ▲0.0292.71 ▼1.1744.12 ▲1.56
Posts /wp-admin/edit.php2,150 ▲502.03 ▲0.0544.16 ▲2.0740.60 ▲3.01
Add New Post /wp-admin/post-new.php1,570 ▲4223.69 ▲0.52696.38 ▲69.8056.09 ▼10.93
Media Library /wp-admin/upload.php1,450 ▲534.33 ▲0.1899.10 ▼0.7745.44 ▲2.27
Dashboard /wp-admin/admin.php?page=efrontpro1,1041.8928.6237.85
Setup /wp-admin/admin.php?page=efrontpro-setup9441.7427.2324.54
Integrations /wp-admin/admin.php?page=efrontpro-integrations8811.6926.5925.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/efrontpro/admin/admin.php+159
    Undefined index: ef-domain
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=efrontpro-integrations
    • > Notice in wp-content/plugins/efrontpro/admin/admin.php+159
    Undefined index: ef-domain
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=efrontpro-integrations
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/admin.php?page=efrontpro-integrations
    • > Notice in wp-content/plugins/efrontpro/utils/utils.php+97
    Undefined variable: courses

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/efrontpro/efrontPRO-SDK/Source/index.php
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/UserGroup.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/CourseUser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/ExtendedProfile.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/Group.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/Branch.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/GroupList.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/TrainingSession.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/CourseList.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/UserJob.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Epignosis\\eFrontPro\\Sdk\\API\\Abstraction\\AbstractAPI' not found in wp-content/plugins/efrontpro/efrontPRO-SDK/Source/Epignosis/eFrontPro/Sdk/API/Handler/User.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: online learning solution, efront, learning management system, online training system, elearning...

efrontpro/efrontpro.php Passed 13 tests

The primary PHP file in "eFront" version 1.2.2 is used by WordPress to initiate all plugin functionality
102 characters long description:
This plugin integrates eFront with Wordpress. Promote your eFront content through your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin8,866 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,0007,0216,520
PHP444221,1661,642
CSS42033628
Markdown212076

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.37
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes27.14%
Methods79
▷ Static methods00.00%
▷ Public methods7189.87%
▷ Protected methods22.53%
▷ Private methods67.59%
Functions40
▷ Named functions3997.50%
▷ Anonymous functions12.50%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/DataTables-1.10.15/media/images/sort_asc.png0.16KB0.25KB0.00%
resources/DataTables-1.10.15/media/images/sort_asc_disabled.png0.14KB0.25KB0.00%
resources/DataTables-1.10.15/media/images/sort_desc.png0.15KB0.25KB0.00%
resources/DataTables-1.10.15/media/images/sort_both.png0.20KB0.29KB0.00%
resources/DataTables-1.10.15/media/images/sort_desc_disabled.png0.14KB0.25KB0.00%