10% simple-student-result

Code Review | Student Result or Employee Database

WordPress plugin Student Result or Employee Database scored10%from 54 tests.

About plugin

  • Plugin page: simple-student-re...
  • Plugin version: 1.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2014
  • Latest release: Feb 11, 2023
  • Number of updates: 191
  • Update frequency: every 15.8 days
  • Top authors: saadamin (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /37,399 total downloads

Benchmarks

Plugin footprint 4% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/simple-student-result/activation.php+27
    Undefined variable: jal_db_version

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.85ms] Passed 4 tests

A check of server-side resources used by Student Result or Employee Database
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0550.43 ▲2.24
Dashboard /wp-admin3.38 ▲0.0758.11 ▲3.45
Posts /wp-admin/edit.php3.43 ▲0.0750.33 ▼3.82
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.29 ▼4.63
Media Library /wp-admin/upload.php3.30 ▲0.0736.53 ▲2.80
Add Subject /wp-admin/post-new.php?post_type=ssr_subjects3.4150.39
Add CGPA /wp-admin/post-new.php?post_type=ssr_cgpa3.4149.69
Students Result /wp-admin/admin.php?page=SSR3.3135.29
Add/Edit Student /wp-admin/admin.php?page=ssr_add_results3.4070.61
View CGPA /wp-admin/edit.php?post_type=ssr_cgpa3.4351.79
All Student /wp-admin/admin.php?page=ssr_all_entires3.3540.61
Subject /wp-admin/edit.php?post_type=ssr_subjects3.4156.02
Settings /wp-admin/admin.php?page=ssr_settings3.3639.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 35 new files
Database: 1 new table, 29 new options
New tables
wp_ssr_studentinfo
New WordPress options
can_compress_scripts
ssr_settings_ssr_item6
ssr_settings_ssr_item8
ssr_settings_ssr_item4
ssr_settings_ssr_item7
ssr_settings_ssr_item10
ssr_settings_ssr_item9
ssr_settings_ssr_item21
ssr_settings_ssr_item12
ssr_settings_ssr_item2
...

Browser metrics 50% from 4 tests

An overview of browser requirements for Student Result or Employee Database
Please improve the following
  • Memory: Try to limit used browser memory to 75.00MB (currently 91.01MB on /wp-admin/admin.php?page=SSR)
  • Script duration: Total JavaScript execution time should be lower than 1,500.00ms (currently 2,336.06ms on /wp-admin/admin.php?page=SSR)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20313.57 ▼1.059.26 ▲7.1537.85 ▼5.39
Dashboard /wp-admin2,264 ▲845.64 ▼0.0687.67 ▼4.6967.74 ▲25.72
Posts /wp-admin/edit.php2,184 ▲842.06 ▲0.0135.62 ▼2.3636.93 ▲3.24
Add New Post /wp-admin/post-new.php1,751 ▲20622.68 ▼0.85721.59 ▲28.6836.91 ▼27.21
Media Library /wp-admin/upload.php1,472 ▲754.29 ▲0.03103.62 ▲1.3886.87 ▲42.56
Add Subject /wp-admin/post-new.php?post_type=ssr_subjects2,2237.61179.74114.48
Add CGPA /wp-admin/post-new.php?post_type=ssr_cgpa2,2237.64165.72112.34
Students Result /wp-admin/admin.php?page=SSR8,35691.012,336.06149.54
Add/Edit Student /wp-admin/admin.php?page=ssr_add_results1,3233.1856.33104.20
View CGPA /wp-admin/edit.php?post_type=ssr_cgpa2,8502.1437.8731.88
All Student /wp-admin/admin.php?page=ssr_all_entires1,0563.1442.1167.66
Subject /wp-admin/edit.php?post_type=ssr_subjects1,8932.0036.6442.51
Settings /wp-admin/admin.php?page=ssr_settings1,3263.3441.8675.98

Uninstaller [IO: ▲0.17MB] [DB: ▲0.01MB] 0% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/simple-student-result/uninstall.php+4
    Cannot redeclare ssr_unins() (previously declared in wp-content/plugins/simple-student-result/activation.php:33)
  • The plugin did not uninstall correctly, leaving 35 files (0.17MB) in the plugin directory
    • (new file) css/others.css
    • (new file) ad_scripts.php
    • (new file) css/zebra_dialog.css
    • (new file) css/ssr_style.css
    • (new file) img/arrow-left.png
    • (new file) css/ssr_viewst.css
    • (new file) css/admin-style.css
    • (new file) img/arrow-right.png
    • (new file) img/confirmation.png
    • (new file) activation.php
    • ...
  • Zombie tables were found after uninstall: 1 table
    • wp_ssr_studentinfo
  • The uninstall procedure has failed, leaving 30 options in the database
    • recovery_mode_email_last_sent
    • ssr_settings_ssr_item12
    • ssr_settings_ssr_item19
    • theysaidso_admin_options
    • ssr_settings_ssr_item17
    • db_upgraded
    • ssr_settings_ssr_item15
    • ssr_settings_ssr_item16
    • ssr_settings_ssr_item14
    • widget_theysaidso_widget
    • ...

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-student-result/views/view_main.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-student-result/views/ssr_shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-student-result/ad_scripts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-student-result/views/all_entries.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-student-result/views/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_post_type() in wp-content/plugins/simple-student-result/menus.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/simple-student-result/views/ssr_add_results.php:3
    • > PHP Warning
      Use of undefined constant SSR_PLUGIN_NAME - assumed 'SSR_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-student-result/views/options.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-student-result/lib/api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/simple-student-result/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-student-result/activation.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in simple-student-result/assets to your readme.txt
  • Tags: There are too many tags (30 tag instead of maximum 10)
The official readme.txt might help

simple-student-result/index.php 85% from 13 tests

This is the main PHP file of "Student Result or Employee Database" version 1.8.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-student-result.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 226 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,418 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP117344992
CSS510288
JavaScript5418138

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions34
▷ Named functions2985.29%
▷ Anonymous functions514.71%
Constants10
▷ Global constants10100.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
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/css_chkbox.png0.82KB1.10KB0.00%
img/warning.png5.31KB1.95KB▼ 63.30%
img/arrow-right.png0.16KB0.22KB0.00%
img/confirmation.png4.57KB2.33KB▼ 49.11%
img/error.png4.54KB2.38KB▼ 47.62%