83% wp-education

Code Review | WP Education - Education WordPress Plugin for Elementor

WordPress plugin WP Education - Education WordPress Plugin for Elementor scored83%from 54 tests.

About plugin

  • Plugin page: wp-education
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2018
  • Latest release: Aug 3, 2023
  • Number of updates: 53
  • Update frequency: every 32.2 days
  • Top authors: devitemsllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,947 total downloads

Benchmarks

Plugin footprint 82% from 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.72MB] [CPU: ▲3.09ms] 75% from 4 tests

A check of server-side resources used by WP Education - Education WordPress Plugin for Elementor
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,361.93ms on /wp-admin/admin.php?page=wpeducation-recommendations)
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6745.09 ▼2.28
Dashboard /wp-admin4.08 ▲0.7864.35 ▲13.14
Posts /wp-admin/edit.php4.14 ▲0.7863.50 ▲6.39
Add New Post /wp-admin/post-new.php6.61 ▲0.7290.81 ▼3.31
Media Library /wp-admin/upload.php3.92 ▲0.6947.36 ▲11.56
Teachers /wp-admin/edit.php?post_type=teachers4.0647.87
Add New /wp-admin/post-new.php?post_type=techeduem_footer4.1054.80
Events /wp-admin/edit.php?post_type=events4.0648.38
Recommendations /wp-admin/admin.php?page=wpeducation-recommendations8.291,361.93
Options /wp-admin/admin.php?page=wpeducation_options3.9243.17
All Items /wp-admin/edit.php?post_type=techeduem_header4.0643.53
Gallery /wp-admin/edit.php?post_type=gallery4.0643.29
Add New /wp-admin/post-new.php?post_type=techeduem_header4.1053.22
Course /wp-admin/edit.php?post_type=wpeducation4.0645.05
All Items /wp-admin/edit.php?post_type=techeduem_footer4.0647.37

Server storage [IO: ▲2.62MB] [DB: ▲0.67MB] Passed 3 tests

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

Browser metrics Passed 4 tests

WP Education - Education WordPress Plugin for Elementor: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,279 ▲49315.68 ▲1.4015.76 ▲13.4159.42 ▲17.05
Dashboard /wp-admin2,487 ▲3076.37 ▲0.74128.16 ▲37.4744.87 ▲5.35
Posts /wp-admin/edit.php2,432 ▲3323.63 ▲1.6557.25 ▲19.5742.15 ▲4.43
Add New Post /wp-admin/post-new.php1,522 ▼617.49 ▼5.42582.12 ▼64.3038.50 ▼20.87
Media Library /wp-admin/upload.php1,569 ▲1694.25 ▲0.0888.67 ▼10.7045.09 ▲1.44
Teachers /wp-admin/edit.php?post_type=teachers1,4193.5952.7034.56
Add New /wp-admin/post-new.php?post_type=techeduem_footer2,2877.98172.7869.33
Events /wp-admin/edit.php?post_type=events1,4163.5851.8734.43
Recommendations /wp-admin/admin.php?page=wpeducation-recommendations3,2203.4594.7738.86
Options /wp-admin/admin.php?page=wpeducation_options1,5323.6291.1133.29
All Items /wp-admin/edit.php?post_type=techeduem_header1,4023.6948.3635.67
Gallery /wp-admin/edit.php?post_type=gallery1,4133.6052.8835.10
Add New /wp-admin/post-new.php?post_type=techeduem_header2,2847.77165.7956.57
Course /wp-admin/edit.php?post_type=wpeducation1,4193.5850.1533.24
All Items /wp-admin/edit.php?post_type=techeduem_footer1,4023.5950.8434.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-posts
    • theysaidso_admin_options
    • events
    • widget_theysaidso_widget
    • teachers
    • can_compress_scripts
    • pro_themes
    • db_upgraded
    • settings
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-education/admin/wpeducation_shortcode.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-education/single-teachers.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-education/single-wpeducation.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'WPEDUCATION_ADDONS_PL_PATHadmin/admin-init.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-education/admin/init.php on line 2
    • > PHP Warning
      require_once(WPEDUCATION_ADDONS_PL_PATHadmin/admin-init.php): failed to open stream: No such file or directory in wp-content/plugins/wp-education/admin/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Icons_Manager' not found in wp-content/plugins/wp-education/includes/class.icon-manager.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-education/admin/wpeducation_custom-post-type.php:324
    • > PHP Warning
      Use of undefined constant WPEDUCATION_ADDONS_PL_PATH - assumed 'WPEDUCATION_ADDONS_PL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-education/admin/init.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WPEducation_Settings_API' not found in wp-content/plugins/wp-education/admin/plugin-options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-education/admin/admin-init.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #20, #21, #22, #23, #24, #25, #26, #27, #28, #29, #3, #30, #31, #32, #4, #5, #6, #7, #8, #9 in wp-education/assets to your readme.txt
You can take inspiration from this readme.txt

wp-education/wpeducation.php 85% from 13 tests

The entry point to "WP Education - Education WordPress Plugin for Elementor" version 1.2.7 is a PHP file that has certain tags in its header comment area
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: Please rename the main PHP file in this plugin to the plugin slug ("wp-education.php" instead of "wpeducation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin23,889 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,72364214,722
CSS6165883,545
SVG1002,671
PO File21,2702,5882,652
JavaScript146896299

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity17.54
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods205
▷ Static methods41.95%
▷ Public methods15475.12%
▷ Protected methods4923.90%
▷ Private methods20.98%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/extensions/hashbar-pro.png3.15KB3.30KB0.00%
(invalid) assets/images/extensions/cf7-extensions-pro.png8.57KB0.00KB▼ 100.00%
(invalid) assets/images/extensions/ht-google-place-review.png2.64KB0.00KB▼ 100.00%
assets/images/extensions/htmega-pro.png4.60KB4.78KB0.00%
assets/images/extensions/woolentor-addons-pro.png3.20KB1.69KB▼ 47.09%