73% attendance-manager

Code Review | Attendance Manager

WordPress plugin Attendance Manager scored73%from 54 tests.

About plugin

  • Plugin page: attendance-manager
  • Plugin version: 0.6.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2015
  • Latest release: Oct 28, 2023
  • Number of updates: 48
  • Update frequency: every 62.6 days
  • Top authors: tnomi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /17,840 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.55ms] 75% from 4 tests

An overview of server-side resources used by Attendance Manager
Please take the time to fix the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 13,625.39ms on /wp-admin/admin.php?page=attmgr-general)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1240.38 ▲3.87
Dashboard /wp-admin3.47 ▲0.1669.05 ▲21.39
Posts /wp-admin/edit.php3.44 ▲0.0843.80 ▼3.75
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.09 ▼12.51
Media Library /wp-admin/upload.php3.31 ▲0.0832.23 ▼1.79
Special Pages /wp-admin/admin.php?page=attmgr-specialpages3.2831.10
General /wp-admin/admin.php?page=attmgr-general4.6413,625.39

Server storage [IO: ▲0.88MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: 1 new table, 8 new options
New tables
wp_attmgr_schedule
New WordPress options
widget_recent-posts
theysaidso_admin_options
attmgr_version
widget_theysaidso_widget
widget_recent-comments
attmgr
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Attendance Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲14013.84 ▼0.729.46 ▲7.5538.86 ▲0.10
Dashboard /wp-admin2,227 ▲495.62 ▼0.1084.52 ▼14.0338.97 ▼1.95
Posts /wp-admin/edit.php2,129 ▲292.01 ▲0.0332.72 ▼8.3235.29 ▼0.12
Add New Post /wp-admin/post-new.php1,550 ▲2423.24 ▲0.22662.74 ▲29.8754.81 ▲6.77
Media Library /wp-admin/upload.php1,432 ▲324.20 ▼0.0396.92 ▼1.1142.64 ▼1.35
Special Pages /wp-admin/admin.php?page=attmgr-specialpages9162.1221.6224.81
General /wp-admin/admin.php?page=attmgr-general1,3022.0423.1766.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_attmgr_schedule
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/attendance-manager/class/class-attmgr.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 ("Scheduler for Admin" page), #2 ("Scheduler for Staff" page), #3 ("Today's Staff" page), #4 ("Weekly schedule" page), #5 ("Monthly schedule" page), #6 (Plugin option)
You can take inspiration from this readme.txt

attendance-manager/attendance-manager.php 92% from 13 tests

"Attendance Manager" version 0.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,602 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP122986022,868
CSS23247355
PO File2136148315
JavaScript18364

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity31.55
▷ Minimum class complexity2.00
▷ Maximum class complexity79.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods121
▷ Static methods10687.60%
▷ Public methods121100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.73MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png128.42KB64.39KB▼ 49.86%
img/nopoatrait.png4.57KB2.00KB▼ 56.28%
screenshot-5.png118.73KB65.30KB▼ 45.00%
screenshot-6.png76.85KB31.31KB▼ 59.26%
screenshot-2.png143.27KB58.73KB▼ 59.01%