57% essay-wizard-wpcres

Code Review | Essay Wizard (wpCRES)

WordPress plugin Essay Wizard (wpCRES) scored57%from 54 tests.

About plugin

  • Plugin page: essay-wizard-wpcres
  • Plugin version: 1.0.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2013
  • Latest release: Feb 11, 2020
  • Number of updates: 41
  • Update frequency: every 60.9 days
  • Top authors: wrenchpilot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,326 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.20ms] Passed 4 tests

Server-side resources used by Essay Wizard (wpCRES)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.47 ▼1.64
Dashboard /wp-admin3.35 ▲0.0547.48 ▼5.02
Posts /wp-admin/edit.php3.47 ▲0.1148.96 ▼1.85
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.30 ▼20.29
Media Library /wp-admin/upload.php3.28 ▲0.0538.04 ▲5.48
Settings /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-settings3.2230.46
Responses /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-view-responses3.2229.40
Add New Assignment /wp-admin/post-new.php?post_type=wpcres_assignment3.4150.49
Import/Export /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-import3.2431.65
CRES Assignments /wp-admin/edit.php?post_type=wpcres_assignment3.3231.81
Help /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-help3.2429.70

Server storage [IO: ▲0.08MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: 3 new tables, 27 new options
New tables
wp_wpcres_response_versions
wp_wpcres_responses
wp_wpcres_scaffold
New WordPress options
wpcres_cleanup_options_on_uninstall
widget_theysaidso_widget
wpcres_reject_email_body
wpcres_approv_email_body
widget_recent-comments
wpcres_response_versions
wpcres_response_view
wpcres_user_email_enable
wpcres_atd_dir
can_compress_scripts
...

Browser metrics Passed 4 tests

Essay Wizard (wpCRES): an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲13513.21 ▼1.181.78 ▲0.2142.62 ▲2.63
Dashboard /wp-admin2,251 ▲605.86 ▲1.00108.70 ▲5.6076.41 ▲30.22
Posts /wp-admin/edit.php2,134 ▲452.00 ▼0.0139.68 ▼1.2635.47 ▼1.48
Add New Post /wp-admin/post-new.php1,551 ▲1823.03 ▼0.19737.90 ▲98.9770.34 ▲14.37
Media Library /wp-admin/upload.php1,430 ▲424.24 ▼0.01120.25 ▲21.4547.82 ▲3.85
Settings /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-settings1,9907.74159.5364.28
Responses /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-view-responses1,1022.0828.4227.39
Add New Assignment /wp-admin/post-new.php?post_type=wpcres_assignment2,6229.01198.23107.72
Import/Export /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-import8982.0226.1626.31
CRES Assignments /wp-admin/edit.php?post_type=wpcres_assignment1,1121.9429.6927.09
Help /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-help1,0982.0326.5528.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_wpcres_responses
    • wp_wpcres_response_versions
    • wp_wpcres_scaffold
  • Zombie WordPress options were found after uninstall: 27 options
    • db_upgraded
    • wpcres_response_view
    • wpcres_cleanup_options_on_uninstall
    • wpcres_reject_email_subject
    • wpcres_user_email_body
    • widget_recent-comments
    • wpcres_user_email_subject
    • widget_recent-posts
    • wpcres_user_email_enable
    • wpcres_reject_email_body
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-settings
    • > Notice in wp-content/plugins/essay-wizard-wpcres/wpcres-settings.php+40
    Undefined variable: wpdb
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-settings
    • > Notice in wp-content/plugins/essay-wizard-wpcres/wpcres-settings.php+40
    Trying to get property 'prefix' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-view-responses
    • > Notice in wp-content/plugins/essay-wizard-wpcres/wpcres-view-results.php+105
    Undefined index: responseID
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-view-responses
    • > Notice in wp-content/plugins/essay-wizard-wpcres/wpcres-view-results.php+446
    Undefined index: status_filter
    • > GET request to /wp-admin/edit.php?post_type=wpcres_assignment&page=wpcres-view-responses
    • > Notice in wp-content/plugins/essay-wizard-wpcres/wpcres-view-results.php+429
    Undefined index: assignment_filter

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/essay-wizard-wpcres/wpcres-shortcode-dropdown.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/essay-wizard-wpcres/wpcres-install.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essay-wizard-wpcres/wpcres-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essay-wizard-wpcres/wpcres-import-export.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essay-wizard-wpcres/wpcres-save-post.php:15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/essay-wizard-wpcres/wpcres-view-results.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essay-wizard-wpcres/wpcres-metabox.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/essay-wizard-wpcres/wpcres-install.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_post_type() in wp-content/plugins/essay-wizard-wpcres/wpcres-post-type.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/essay-wizard-wpcres/wpcres-response.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essay-wizard-wpcres/wpcres-help.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=wpcres_assignment
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=wpcres_assignment:413:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=wpcres_assignment
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: critical review examination system, essay wizard

essay-wizard-wpcres/wpcres.php 92% from 13 tests

The primary PHP file in "Essay Wizard (wpCRES)" version 1.0.6.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("essay-wizard-wpcres.php" instead of "wpcres.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,417 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP142403001,380
Markdown113019
JavaScript11418

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions1666.67%
▷ Anonymous functions833.33%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/book-16x16.png1.35KB0.51KB▼ 62.60%