68% eduhack

Code Review | EduHack

WordPress plugin EduHack scored68%from 54 tests.

About plugin

  • Plugin page: eduhack
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 6, 2013
  • Latest release: Jul 15, 2016
  • Number of updates: 7
  • Update frequency: every 153.7 days
  • Top authors: webarthur (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /4,100 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼35.44ms] Passed 4 tests

A check of server-side resources used by EduHack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.38 ▲2.08
Dashboard /wp-admin3.02 ▼0.3322.78 ▼33.25
Posts /wp-admin/edit.php3.02 ▼0.3423.62 ▼27.39
Add New Post /wp-admin/post-new.php3.02 ▼2.8723.07 ▼72.74
Media Library /wp-admin/upload.php3.02 ▼0.2123.35 ▼8.38
EduHack /wp-admin/admin.php?page=eduhack2.7916.28
Levels /wp-admin/admin.php?page=eduhack-add-level2.7916.54
Add New Course /wp-admin/admin.php?page=eduhack-add-new-course2.7914.87

Server storage [IO: ▲0.04MB] [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
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for EduHack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.34 ▲0.051.77 ▼0.0646.14 ▲4.39
Dashboard /wp-admin2,219 ▲395.62 ▼0.0585.69 ▼1.3238.80 ▼5.98
Posts /wp-admin/edit.php2,127 ▲241.98 ▲0.0040.75 ▼2.8934.86 ▼1.64
Add New Post /wp-admin/post-new.php1,548 ▲2022.94 ▼0.28628.75 ▼49.8851.14 ▼5.17
Media Library /wp-admin/upload.php1,421 ▲244.25 ▲0.0195.25 ▼18.7241.04 ▼10.54
EduHack /wp-admin/admin.php?page=eduhack7992.0024.0824.96
Levels /wp-admin/admin.php?page=eduhack-add-level9641.9923.8928.76
Add New Course /wp-admin/admin.php?page=eduhack-add-new-course8472.0024.7925.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/eduhack/index.php+323
    Undefined index: page
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eduhack-add-new-course
    • > Notice in wp-content/plugins/eduhack/index.php+39
    Undefined index: export
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=eduhack-add-new-course
    • > Notice in wp-content/plugins/eduhack/admin-course.php+37
    Undefined variable: course
    • > GET request to /wp-admin/admin.php?page=eduhack-add-new-course
    • > Notice in wp-content/plugins/eduhack/admin-course.php+24
    Trying to get property 'post_title' of non-object
    • > GET request to /wp-admin/admin.php?page=eduhack-add-new-course
    • > Notice in wp-content/plugins/eduhack/admin-course.php+37
    Trying to get property 'post_excerpt' of non-object

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 fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/eduhack/admin-view-course.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eduhack/index.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/eduhack/admin-course.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function eduhack_get_courses() in wp-content/plugins/eduhack/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function eduhack_get() in wp-content/plugins/eduhack/admin-module.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/eduhack/admin-level.php:12
    • > PHP Notice
      Undefined index: course in wp-content/plugins/eduhack/admin-view-course.php on line 5

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 93% 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 require attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

eduhack/index.php 92% from 13 tests

"EduHack" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("eduhack.php" instead of "index.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 plugin811 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP726163755
JavaScript1271053
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin