79% easy-attendance

Code Review | Easy Attendance

WordPress plugin Easy Attendance scored79%from 54 tests.

About plugin

  • Plugin page: easy-attendance
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 13, 2022
  • Latest release: May 25, 2022
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: tegos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.68MB] [CPU: ▼18.73ms] Passed 4 tests

This is a short check of server-side resources used by Easy Attendance
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.64 ▼2.75
Dashboard /wp-admin3.34 ▲0.0445.56 ▼5.93
Posts /wp-admin/edit.php3.39 ▲0.0447.56 ▲0.14
Add New Post /wp-admin/post-new.php3.07 ▼2.8124.80 ▼66.36
Media Library /wp-admin/upload.php3.27 ▲0.0434.79 ▲1.73
Attendance List /wp-admin/edit.php?post_type=tgsea_times3.3136.71
Export Attendance CSV /wp-admin/edit.php?post_type=tgsea_times&page=tegosoutputcsv3.2630.47
Add Attendance /wp-admin/post-new.php?post_type=tgsea_times3.0724.05

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
Activated_EasyAttendance
widget_recent-comments

Browser metrics Passed 4 tests

Easy Attendance: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲10413.33 ▼0.852.08 ▼0.0243.85 ▼3.82
Dashboard /wp-admin2,253 ▲655.88 ▲1.00103.44 ▼17.6840.14 ▼5.53
Posts /wp-admin/edit.php2,139 ▲502.02 ▲0.0339.67 ▲4.5037.00 ▲0.47
Add New Post /wp-admin/post-new.php1,570 ▲5118.17 ▼4.92589.75 ▼82.0452.94 ▼5.95
Media Library /wp-admin/upload.php1,438 ▲564.27 ▲0.0495.92 ▼1.9641.87 ▼1.70
Attendance List /wp-admin/edit.php?post_type=tgsea_times1,1092.0032.4628.34
Export Attendance CSV /wp-admin/edit.php?post_type=tgsea_times&page=tegosoutputcsv9132.0625.3021.28
Add Attendance /wp-admin/post-new.php?post_type=tgsea_times1,6272.6247.4351.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=tgsea_times&page=tegosoutputcsv
    • > Notice in wp-content/plugins/easy-attendance/views/outputcsv.php+5
    Undefined variable: title
    • > GET request to /wp-admin/edit.php?post_type=tgsea_times&page=tegosoutputcsv
    • > Notice in wp-content/plugins/easy-attendance/class.easy-attendance-post.php+279
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=tgsea_times
    • > Notice in wp-content/plugins/easy-attendance/class.easy-attendance-post.php+174
    Undefined index: post_type

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/easy-attendance/templates/single-tgsea.php:1
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/admin-header.php' (include_path='.:/usr/share/php') in wp-content/plugins/easy-attendance/views/outputcsv.php on line 2
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/easy-attendance/views/post.php:1
    • > PHP Warning
      require_once(ABSPATHwp-admin/admin-header.php): failed to open stream: No such file or directory in wp-content/plugins/easy-attendance/views/outputcsv.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-attendance/views/outputcsv.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-attendance/views/setting.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
1 plugin tags: csv attendance member

easy-attendance/easy-attendance.php Passed 13 tests

The primary PHP file in "Easy Attendance" version 1.0.1 is used by WordPress to initiate all plugin functionality
136 characters long description:
"Easy Attendance" provides custom post types in a simplified format.It is possible to output registered custom post types in CSV format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected692 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP88382537
PO File25360152
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2496.00%
▷ Public methods1768.00%
▷ Protected methods00.00%
▷ Private methods832.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants535.71%
▷ Class constants964.29%
▷ Public constants888.89%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected