78% edukit-assessed-posts

Code Review | EduKit Assessed Posts

WordPress plugin EduKit Assessed Posts scored78%from 54 tests.

About plugin

  • Plugin page: edukit-assessed-p...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2017
  • Latest release: Apr 7, 2017
  • Number of updates: 8
  • Update frequency: every 3.3 days
  • Top authors: alexfurr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼12.89ms] Passed 4 tests

This is a short check of server-side resources used by EduKit Assessed Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▼0.5416.25 ▼25.40
Dashboard /wp-admin3.45 ▲0.1548.50 ▼2.45
Posts /wp-admin/edit.php3.56 ▲0.2147.71 ▲0.53
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.21 ▼21.46
Media Library /wp-admin/upload.php3.37 ▲0.1436.57 ▼2.23
All Assessments /wp-admin/edit.php?post_type=ek_assessed_posts3.4136.73
/wp-admin/admin.php?page=ek-assessed-posts-list3.3428.22
Create Assessment /wp-admin/post-new.php?post_type=ek_assessed_posts3.4947.58

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 232 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by EduKit Assessed Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,507 ▼22813.53 ▼1.220.54 ▼1.3719.56 ▼22.81
Dashboard /wp-admin2,257 ▲695.31 ▲0.41118.06 ▲3.0841.92 ▼4.55
Posts /wp-admin/edit.php2,151 ▲622.42 ▲0.3739.55 ▲2.1731.92 ▲1.82
Add New Post /wp-admin/post-new.php1,566 ▼10223.23 ▲1.28629.33 ▼1.3871.77 ▲6.23
Media Library /wp-admin/upload.php1,447 ▲564.46 ▲0.2498.66 ▲0.3844.91 ▲2.22
All Assessments /wp-admin/edit.php?post_type=ek_assessed_posts1,1422.4034.3827.25
/wp-admin/admin.php?page=ek-assessed-posts-list6971.679.9118.73
Create Assessment /wp-admin/post-new.php?post_type=ek_assessed_posts2,5668.04172.4664.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/edukit-assessed-posts/tcpdf/tools/tcpdf_addfont.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edukit-assessed-posts/classes/class-cpts.php:23
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/edukit-assessed-posts/tcpdf/tcpdf.php on line 17770
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/edukit-assessed-posts/functions.php:29
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/edukit-assessed-posts/tcpdf/tcpdf.php on line 17770
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/edukit-assessed-posts/edukit-assessed-posts.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: plugin

edukit-assessed-posts/edukit-assessed-posts.php Passed 13 tests

The main PHP script in "EduKit Assessed Posts" version 0.1 is automatically included on every request by WordPress
61 characters long description:
Create assessments for students to submit blog posts against.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected47,781 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP1061,90912,14147,668
CSS126173
JSON10040

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,296)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 496)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity337.65
▷ Minimum class complexity1.00
▷ Maximum class complexity4,296.00
Average method complexity10.21
▷ Minimum method complexity1.00
▷ Maximum method complexity496.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods731
▷ Static methods11615.87%
▷ Public methods45462.11%
▷ Protected methods27737.89%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants106
▷ Global constants106100.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
No PNG images were found in this plugin