78% eduhack

Code Review | EduHack

WordPress plugin EduHack scored 78% 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: 5.9.2
  • 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 / 3,428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.14MB] [CPU: ▼323.51ms] Passed 4 tests

A check of server-side resources used by EduHack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1752.87 ▲1.49
Dashboard /wp-admin3.19 ▼0.2217.60 ▼14.68
Posts /wp-admin/edit.php3.19 ▼0.4518.19 ▼19.22
Add New Post /wp-admin/post-new.php3.19 ▼3.7817.99 ▼1,250.29
Media Library /wp-admin/upload.php3.19 ▼0.1015.76 ▼9.83
Add New Course /wp-admin/admin.php?page=eduhack-add-new-course2.9615.96
EduHack /wp-admin/admin.php?page=eduhack2.9614.66
Levels /wp-admin/admin.php?page=eduhack-add-level2.9614.64

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for EduHack
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,830 ▲8616.17 ▲0.475.98 ▲0.062.58 ▲0.49
Dashboard /wp-admin2,927 ▲696.17 ▲0.10120.80 ▼12.40155.24 ▼8.88
Posts /wp-admin/edit.php2,723 ▲383.24 ▲0.0162.42 ▲0.26136.38 ▼4.54
Add New Post /wp-admin/post-new.php1,690 ▲2919.07 ▲3.17418.08 ▼3.47157.45 ▲8.33
Media Library /wp-admin/upload.php1,732 ▲345.52 ▲0.04135.53 ▼8.64189.20 ▲3.75
Add New Course /wp-admin/admin.php?page=eduhack-add-new-course1,0882.3755.14125.82
EduHack /wp-admin/admin.php?page=eduhack1,0152.4154.40106.47
Levels /wp-admin/admin.php?page=eduhack-add-level1,2042.4253.02119.46

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
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/eduhack/index.php+323
    Undefined index: page

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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=eduhack-add-level
    • > 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: course in wp-content/plugins/eduhack/admin-view-course.php on line 5
    • > 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 add_action() in wp-content/plugins/eduhack/index.php:13
    • > 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-view-course.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/eduhack/admin-level.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

eduhack/index.php 92% from 13 tests

The main PHP script in "EduHack" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("eduhack.php" instead of "index.php")

Code Analysis Passed 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
Everything looks great! 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

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued 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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected