74% wp-attend

Code Review | WP Attend

WordPress plugin WP Attend scored74%from 54 tests.

About plugin

  • Plugin page: wp-attend
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Oct 28, 2019
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: bitsandarts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.64MB] [CPU: ▼15.34ms] Passed 4 tests

This is a short check of server-side resources used by WP Attend
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2343.00 ▲4.77
Dashboard /wp-admin3.34 ▼0.0147.47 ▼11.63
Posts /wp-admin/edit.php3.45 ▲0.0950.69 ▲4.22
Add New Post /wp-admin/post-new.php3.22 ▼2.6737.56 ▼57.22
Media Library /wp-admin/upload.php3.26 ▲0.0336.82 ▲3.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 45 new files
Database: 3 new tables, 7 new options
New tables
wp_at_subscriptions
wp_at_activities
wp_at_activities_attendances
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
wpattend_privacy_policy_url

Browser metrics Passed 4 tests

WP Attend: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.62 ▼0.7414.57 ▲12.8846.68 ▲3.63
Dashboard /wp-admin2,240 ▲635.64 ▼0.0194.17 ▼16.9445.75 ▲2.01
Posts /wp-admin/edit.php2,143 ▲402.01 ▼0.0141.91 ▲3.2838.41 ▲3.91
Add New Post /wp-admin/post-new.php1,556 ▲3023.35 ▼0.32610.61 ▼80.7058.83 ▼5.22
Media Library /wp-admin/upload.php1,442 ▲454.25 ▲0.0796.73 ▼4.6146.19 ▼1.34

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_at_activities
    • wp_at_subscriptions
    • wp_at_activities_attendances
  • This plugin does not fully uninstall, leaving 7 options in the database
    • wpattend_privacy_policy_url
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-attend/includes/controllers/class-wp-attend-activity-controller.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-attend/includes/controllers/class-subscription-controller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_AT_List_Table' not found in wp-content/plugins/wp-attend/includes/pages/subscriptions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-attend/includes/pages/admin_wpattend.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-attend/includes/pages/general-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table_C' not found in wp-content/plugins/wp-attend/includes/components/class-wp-at-list-table.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: administration, registration, calendar, attendance, email...

wp-attend/WPAttend.php 92% from 13 tests

The principal PHP file in "WP Attend" v. 1.0.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-attend.php" instead of "WPAttend.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin15,354 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,263919,270
JavaScript68723383,769
PHP143375961,780
Sass4761422
PO File1415397
Ruby131216

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods96
▷ Static methods11.04%
▷ Public methods7072.92%
▷ Protected methods2121.88%
▷ Private methods55.21%
Functions13
▷ Named functions17.69%
▷ Anonymous functions1292.31%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/images/calendar_grey_small.png0.47KB0.41KB▼ 13.10%
styles/images/calendar_small.png0.33KB0.30KB▼ 9.55%
styles/images/edit.png1.47KB1.13KB▼ 22.82%
styles/images/person_notattend.png2.89KB1.84KB▼ 36.14%
styles/images/calendar_grey.png2.48KB1.72KB▼ 30.55%