84% visit-notifications

Code Review | Visit Notifications

WordPress plugin Visit Notifications scored84%from 54 tests.

About plugin

  • Plugin page: visit-notifications
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Aug 8, 2022
  • Latest release: Nov 6, 2023
  • Number of updates: 5
  • Update frequency: every 91.6 days
  • Top authors: wphelpdeskuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /673 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.13MB] [CPU: ▼4.57ms] Passed 4 tests

Server-side resources used by Visit Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1336.06 ▼2.35
Dashboard /wp-admin3.44 ▲0.1346.35 ▼6.50
Posts /wp-admin/edit.php3.55 ▲0.2048.15 ▼0.86
Add New Post /wp-admin/post-new.php6.02 ▲0.1393.43 ▼8.57
Media Library /wp-admin/upload.php3.36 ▲0.1335.86 ▲3.38

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 455 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Visit Notifications: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4614.34 ▼0.011.66 ▲0.1642.04 ▼1.32
Dashboard /wp-admin2,213 ▲385.65 ▼0.0492.38 ▼11.1645.48 ▲5.57
Posts /wp-admin/edit.php2,119 ▲192.16 ▲0.1839.93 ▲1.1739.14 ▲2.46
Add New Post /wp-admin/post-new.php1,544 ▲1823.56 ▲0.46606.04 ▼31.4149.16 ▼0.89
Media Library /wp-admin/upload.php1,421 ▲184.17 ▼0.06101.38 ▲1.4447.25 ▲4.06

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 | 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 fix the following
  • 90× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/admin/views/acf-field-group/location-rule.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/fields/class-acf-field-output.php:5
    • > PHP Notice
      Undefined variable: group_id in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/admin/views/acf-field-group/location-group.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/acf-hook-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/fields/class-acf-field-true_false.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_idify() in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/admin/views/acf-field-group/conditional-logic.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/acf-helper-functions.php:142
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/fields/class-acf-field-time_picker.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_number' not found in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/fields/class-acf-field-range.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visit-notifications/lib/advanced-custom-fields/includes/admin/views/browse-fields-modal.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
5 plugin tags: notification, visit, read, receipt, post

visit-notifications/visit-notifications.php 92% from 13 tests

The principal PHP file in "Visit Notifications" v. 3.1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.8" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected193,171 lines of code in 348 files:
LanguageFilesBlank linesComment linesLines of code
PO File4646,76770,992112,491
JavaScript195,3477,48739,438
PHP1719,66721,60027,525
CSS157151,52913,136
SVG9500291
Markdown1580281
XML1319

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity19.48
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes119
▷ Abstract classes32.52%
▷ Concrete classes11697.48%
▷ Final classes21.72%
Methods1,025
▷ Static methods30.29%
▷ Public methods98696.20%
▷ Protected methods90.88%
▷ Private methods302.93%
Functions564
▷ Named functions54596.63%
▷ Anonymous functions193.37%
Constants15
▷ Global constants1066.67%
▷ Class constants533.33%
▷ Public constants5100.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
43 PNG files occupy 0.86MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-text.png9.12KB4.80KB▼ 47.41%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-file.png9.01KB3.74KB▼ 58.46%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-taxonomy.png11.45KB6.06KB▼ 47.07%
lib/advanced-custom-fields/assets/images/field-type-previews/field-preview-relationship.png22.77KB10.24KB▼ 55.04%
lib/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%