74% student-inquiry-listing

Code Review | Student Inquiry

WordPress plugin Student Inquiry scored 74% from 54 tests.

About plugin

  • Plugin page: student-inquiry-l...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.7
  • WordPress version: 5.8.1
  • First release: Jun 20, 2020
  • Latest release: Mar 10, 2021
  • Number of updates: 7
  • Update frequency: every 38.0 days
  • Top authors: saumil122 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 236 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼140.54ms] Passed 4 tests

Server-side resources used by Student Inquiry
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1235.74 ▲2.03
Dashboard /wp-admin3.19 ▲0.1334.90 ▼11.50
Posts /wp-admin/edit.php3.27 ▲0.1742.27 ▲0.95
Add New Post /wp-admin/post-new.php5.55 ▲0.1290.14 ▼548.77
Media Library /wp-admin/upload.php3.13 ▲0.1332.11 ▼2.82
Send email /wp-admin/admin.php?page=inquiries_send_email3.1130.20
Add new /wp-admin/admin.php?page=inquiries_form3.1025.44
Inquiries /wp-admin/admin.php?page=inquiries3.1127.70

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 1 new option
New tables
wp_inquiries
New WordPress options
student_inquiry_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Student Inquiry
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,726 ▲13015.95 ▲0.047.83 ▼0.6449.78 ▲3.35
Dashboard /wp-admin3,017 ▲806.16 ▲0.24134.36 ▼11.29115.15 ▼4.34
Posts /wp-admin/edit.php2,786 ▲502.73 ▲0.0571.37 ▲9.1290.51 ▲7.55
Add New Post /wp-admin/post-new.php1,531 ▲3118.42 ▼0.15350.69 ▼17.15108.33 ▲0.43
Media Library /wp-admin/upload.php1,867 ▲575.13 ▲0.12130.87 ▼32.35119.19 ▼7.45
Send email /wp-admin/admin.php?page=inquiries_send_email1,4322.5563.9986.28
Add new /wp-admin/admin.php?page=inquiries_form1,3522.4261.8079.01
Inquiries /wp-admin/admin.php?page=inquiries1,4412.4261.8866.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_inquiries
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • student_inquiry_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/student-inquiry-listing/student-inquiry.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: send email, crud operations, backend, plugin, student inquiry...

student-inquiry-listing/student-inquiry.php 92% from 13 tests

The principal PHP file in "Student Inquiry" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("student-inquiry-listing.php" instead of "student-inquiry.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,114 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS142491,249
PHP1120139801
JavaScript191664

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.60MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png55.02KB9.26KB▼ 83.18%
screenshot-3.png145.39KB35.57KB▼ 75.54%
screenshot-2.png94.90KB16.74KB▼ 82.36%
screenshot-4.png115.76KB24.22KB▼ 79.08%
screenshot-1.png199.36KB56.74KB▼ 71.54%