78% attendance-check

Code Review | Attendance Check

WordPress plugin Attendance Check scored78%from 54 tests.

About plugin

  • Plugin page: attendance-check
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 20, 2018
  • Latest release: Oct 22, 2018
  • Number of updates: 10
  • Update frequency: every 0.4 days
  • Top authors: presscat2015 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,438 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼3.83ms] Passed 4 tests

A check of server-side resources used by Attendance Check
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.68 ▲5.45
Dashboard /wp-admin3.31 ▲0.0041.86 ▼2.75
Posts /wp-admin/edit.php3.36 ▲0.0052.24 ▲5.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.03 ▼14.46
Media Library /wp-admin/upload.php3.23 ▲0.0033.26 ▼3.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 124 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Attendance Check: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.331.96 ▲0.2245.58 ▲2.96
Dashboard /wp-admin2,206 ▲145.85 ▲0.93108.20 ▼5.2140.86 ▲0.02
Posts /wp-admin/edit.php2,092 ▲32.17 ▲0.1842.16 ▲8.5936.22 ▲0.25
Add New Post /wp-admin/post-new.php1,533 ▼323.11 ▼0.00644.21 ▼4.7654.93 ▲5.96
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.0995.80 ▼3.1840.57 ▼5.35

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/attendance-check/template.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant PAC_PLUGIN_URL - assumed 'PAC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/attendance-check/template.php on line 26
    • > PHP Warning
      Use of undefined constant PAC_PLUGIN_URL - assumed 'PAC_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/attendance-check/template.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/attendance-check/includes/hooks.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/attendance-check/includes/class-settings.php:125
    • > PHP Fatal error
      Uncaught Error: Class 'myCRED_Hook' not found in wp-content/plugins/attendance-check/includes/class-mycred-hook.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: attendance, attendance check, calendar

attendance-check/presscat-attendance-check.php 85% from 13 tests

This is the main PHP file of "Attendance Check" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("attendance-check.php" instead of "presscat-attendance-check.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin3,175 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
Sass434991,8302,152
PHP65279461
CSS2332103307
JavaScript3710244214
PO File1111241

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/seal.png13.65KB6.32KB▼ 53.69%
assets/images/transparent.png0.11KB0.10KB▼ 9.48%
assets/images/no_seal.png5.88KB4.44KB▼ 24.50%